Skip to content

Commit

Permalink
feat(loader): support options.productionMode (#1208)
Browse files Browse the repository at this point in the history
* fix(loader): use options.minimize

* misc(loader): rename options.minimize ~> options. productionMode

* feat(doc): add productionMode to options list
  • Loading branch information
pi0 authored and yyx990803 committed Mar 23, 2018
1 parent e9cbbcd commit 69bc1c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,4 @@ The following option has been changed to resourceQuery:
- `transformAssetUrls`
- `optimizeSSR`
- `hotReload`
- `productionMode`
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function (source) {

const isServer = target === 'node'
const isShadow = incomingQuery.shadow != null
const isProduction = minimize || process.env.NODE_ENV === 'production'
const isProduction = options.productionMode || minimize || process.env.NODE_ENV === 'production'
const filename = path.basename(resourcePath)
const context = rootContext || process.cwd()
const sourceRoot = path.dirname(path.relative(context, resourcePath))
Expand Down

0 comments on commit 69bc1c1

Please sign in to comment.