"email": "posva13@gmail.com"
},
"scripts": {
- "build": "rollup -c rollup.config.js",
+ "build": "rimraf dist && rollup -c rollup.config.js",
"build:dts": "api-extractor run --local --verbose",
"size": "rollup -c size-checks/rollup.config.js && node scripts/check-size.js",
"release": "bash scripts/release.sh",
replacements[key] = process.env[key]
}
})
- return replace(replacements)
+ return replace({
+ preventAssignment: true,
+ values: replacements,
+ })
}
function createProductionConfig(format) {
input: path.resolve(__dirname, './small.js'),
plugins: [
replace({
- __DEV__: false,
- // this is only used during tests
- __TEST__: false,
- // If the build is expected to run directly in the browser (global / esm builds)
- __BROWSER__: true,
- // is targeting bundlers?
- __BUNDLER__: false,
- __GLOBAL__: false,
- // is targeting Node (SSR)?
- __NODE_JS__: false,
- __VUE_PROD_DEVTOOLS__: false,
+ preventAssignment: true,
+ values: {
+ __DEV__: 'false',
+ 'process.env.NODE_ENV': JSON.stringify('production'),
+ // this is only used during tests
+ __TEST__: 'false',
+ // If the build is expected to run directly in the browser (global / esm builds)
+ __BROWSER__: 'true',
+ // is targeting bundlers?
+ __BUNDLER__: 'false',
+ __GLOBAL__: 'false',
+ // is targeting Node (SSR)?
+ __NODE_JS__: 'false',
+ __VUE_PROD_DEVTOOLS__: 'false',
+ },
}),
ts({
check: false,