Skip to content

Commit 69bc1c1

Browse files
pi0yyx990803
authored andcommitted
feat(loader): support options.productionMode (#1208)
* fix(loader): use options.minimize * misc(loader): rename options.minimize ~> options. productionMode * feat(doc): add productionMode to options list
1 parent e9cbbcd commit 69bc1c1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,4 @@ The following option has been changed to resourceQuery:
222222
- `transformAssetUrls`
223223
- `optimizeSSR`
224224
- `hotReload`
225+
- `productionMode`

Diff for: lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = function (source) {
3030

3131
const isServer = target === 'node'
3232
const isShadow = incomingQuery.shadow != null
33-
const isProduction = minimize || process.env.NODE_ENV === 'production'
33+
const isProduction = options.productionMode || minimize || process.env.NODE_ENV === 'production'
3434
const filename = path.basename(resourcePath)
3535
const context = rootContext || process.cwd()
3636
const sourceRoot = path.dirname(path.relative(context, resourcePath))

0 commit comments

Comments
 (0)