Skip to content

Commit

Permalink
fix(nano-build): target versions in presets
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 23, 2023
1 parent 93b40d4 commit b73cb26
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
16 changes: 14 additions & 2 deletions packages/nano-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,17 @@ Add the following scripts to your `package.json`:
...defaultPreset,
format: 'iife',
platform: 'browser',
target: 'es2017',
mangleProps: '_$',
treeShaking: true,
sourcemap: false,
sourcesContent: false,
target: [
'es2018',
'chrome62',
'edge79',
'firefox78',
'safari11',
],
}
```

Expand All @@ -86,11 +92,17 @@ Add the following scripts to your `package.json`:
outdir: 'dist/es',
format: 'iife',
platform: 'browser',
target: 'es2017',
mangleProps: '_$',
treeShaking: true,
sourcemap: false,
sourcesContent: false,
target: [
'es2018',
'chrome62',
'edge79',
'firefox78',
'safari11',
],
}
```

Expand Down
16 changes: 14 additions & 2 deletions packages/nano-build/nano-build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,34 @@ const presetRecord = {
pwa: {
format: 'iife',
platform: 'browser',
target: 'es2017',
mangleProps: '_$',
treeShaking: true,
sourcemap: false,
sourcesContent: false,
target: [
'es2018',
'chrome62',
'edge79',
'firefox78',
'safari11',
],
},
pmpa: {
entryPoints: ['site/_ts/*.ts'],
outdir: 'dist/es',
format: 'iife',
platform: 'browser',
target: 'es2017',
mangleProps: '_$',
treeShaking: true,
sourcemap: false,
sourcesContent: false,
target: [
'es2018',
'chrome62',
'edge79',
'firefox78',
'safari11',
],
},
};

Expand Down

0 comments on commit b73cb26

Please sign in to comment.