workflow: allow dropping dev only blocks in dev script

This commit is contained in:
Evan You 2019-05-29 10:34:07 +08:00
parent f2116054a0
commit 6dfec3a4ae
2 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,8 @@ if (process.env.NODE_ENV === 'production') {
module.exports = packageConfigs
function createConfig(output, plugins = []) {
const isProductionBuild = /\.prod\.js$/.test(output.file)
const isProductionBuild =
process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file)
const isGlobalBuild = /\.global(\.prod)?\.js$/.test(output.file)
const isBunlderESMBuild = /\.esm\.js$/.test(output.file)
const isBrowserESMBuild = /esm-browser(\.prod)?\.js$/.test(output.file)

View File

@ -10,6 +10,9 @@ yarn dev dom
# specify the format to output
yarn dev core --formats cjs
# Can also drop all __DEV__ blocks with:
__DEV__=false yarn dev
```
*/