Skip to content

Commit

Permalink
export config depending on environment
Browse files Browse the repository at this point in the history
  • Loading branch information
korelstar committed Jul 13, 2020
1 parent 0fadf4b commit aa13899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ Use this base config package to cleanup all your complicated setups and rely on

const webpackConfig = require('@nextcloud/webpack-vue-config')

if (process.env.NODE_ENV === 'production') {
module.exports = webpackConfig.prod
}
module.exports = webpackConfig.dev
module.exports = webpackConfig
```

```json
Expand Down Expand Up @@ -48,8 +45,5 @@ const config = {
],
}

if (process.env.NODE_ENV === 'production') {
module.exports = merge(config, webpackConfig.prod)
}
module.exports = merge(config, webpackConfig.dev)
module.exports = merge(config, webpackConfig)
```
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@
const dev = require('./webpack.dev.js')
const prod = require('./webpack.prod.js')

module.exports = {
dev,
prod
}
module.exports = process.env.NODE_ENV === 'development' ? dev : prod

0 comments on commit aa13899

Please sign in to comment.