Skip to content

Commit

Permalink
build: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Mar 4, 2021
1 parent 88e3772 commit da3cfd6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"email": "[email protected]"
},
"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",
Expand Down
5 changes: 4 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ function createReplacePlugin(
replacements[key] = process.env[key]
}
})
return replace(replacements)
return replace({
preventAssignment: true,
values: replacements,
})
}

function createProductionConfig(format) {
Expand Down
26 changes: 15 additions & 11 deletions size-checks/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ const config = {
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,
Expand Down

0 comments on commit da3cfd6

Please sign in to comment.