(config: BuildConfig, code: string, outPath: string)
| 177 | } |
| 178 | |
| 179 | async function submoduleCoreProduction(config: BuildConfig, code: string, outPath: string) { |
| 180 | const result = await minify(code, { |
| 181 | compress: { |
| 182 | pure_getters: true, |
| 183 | unsafe_symbols: true, |
| 184 | keep_fargs: false, |
| 185 | join_vars: false, |
| 186 | |
| 187 | global_defs: { |
| 188 | 'globalThis.qDev': false, |
| 189 | 'globalThis.qInspector': false, |
| 190 | 'globalThis.qSerialize': true, |
| 191 | 'globalThis.qDynamicPlatform': true, |
| 192 | 'globalThis.qTest': false, |
| 193 | 'globalThis.qRuntimeQrl': false, |
| 194 | 'globalThis.QWIK_VERSION': JSON.stringify(config.distVersion), |
| 195 | }, |
| 196 | }, |
| 197 | format: { |
| 198 | beautify: true, |
| 199 | braces: true, |
| 200 | comments: /__PURE__/, |
| 201 | preserve_annotations: true, |
| 202 | ecma: 2020, |
| 203 | preamble: getBanner('@builder.io/qwik', config.distVersion), |
| 204 | }, |
| 205 | mangle: false, |
| 206 | }); |
| 207 | code = result.code!; |
| 208 | |
| 209 | await writeFile(outPath, code + '\n'); |
| 210 | } |
| 211 | |
| 212 | async function submoduleCoreDev(config: BuildConfig) { |
| 213 | const submodule = 'core'; |
no test coverage detected
searching dependent graphs…