We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3392856 commit 75ff912Copy full SHA for 75ff912
1 file changed
packages/plugin-assets-retry/scripts/postCompile.mjs
@@ -24,20 +24,25 @@ async function compileRuntimeFile(filename) {
24
__dirname,
25
`../dist/runtime/${filename}.min.js`,
26
);
27
+
28
const { code } = await transform(runtimeCode, {
29
jsc: {
30
target: 'es5',
31
parser: {
32
syntax: 'typescript',
33
},
34
35
+ // Output script file to be used in `<script>` tag
36
isModule: false,
37
sourceFileName: sourceFilePath,
38
});
39
40
const { code: minifiedRuntimeCode } = await minify(code, {
41
ecma: 5,
42
+ // allows SWC to mangle function names
43
module: true,
44
45
46
await Promise.all([
47
writeFile(distPath, code),
48
writeFile(distMinPath, minifiedRuntimeCode),
0 commit comments