diff --git a/lib/index.js b/lib/index.js index 0d3403747..ba41b2dcd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -38,7 +38,7 @@ module.exports = function (source) { const options = loaderUtils.getOptions(loaderContext) || {} const isServer = target === 'node' - const isShadow = incomingQuery.shadow != null + const isShadow = !!options.shadowMode const isProduction = options.productionMode || minimize || process.env.NODE_ENV === 'production' const filename = path.basename(resourcePath) const context = rootContext || process.cwd()