mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
feat(cli.js): add CommonJS dist files (#2646)
This commit is contained in:
committed by
GitHub
parent
0f321ac08d
commit
205b0dc8f3
5
.changes/cli.js-cjs-output.md
Normal file
5
.changes/cli.js-cjs-output.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Added CommonJS output to the `dist` folder.
|
||||
@@ -27,13 +27,23 @@ export default {
|
||||
},
|
||||
treeshake: true,
|
||||
perf: true,
|
||||
output: {
|
||||
dir: 'dist/',
|
||||
entryFileNames: '[name].js',
|
||||
format: 'esm',
|
||||
exports: 'named',
|
||||
globals: {}
|
||||
},
|
||||
output: [
|
||||
{
|
||||
dir: 'dist/',
|
||||
entryFileNames: '[name].js',
|
||||
format: 'esm',
|
||||
exports: 'named',
|
||||
globals: {}
|
||||
},
|
||||
{
|
||||
dir: 'dist/',
|
||||
entryFileNames: '[name].cjs',
|
||||
format: 'cjs',
|
||||
chunkFileNames: '[name]-[hash].cjs',
|
||||
exports: 'named',
|
||||
globals: {}
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
replace({
|
||||
__RUST_CLI_VERSION__: JSON.stringify(cliManifest.package.version),
|
||||
|
||||
Reference in New Issue
Block a user