diff --git a/packages/webpack-plugin/lib/resolver/AddEnvPlugin.js b/packages/webpack-plugin/lib/resolver/AddEnvPlugin.js index a1c6418ee..f1d7f6678 100644 --- a/packages/webpack-plugin/lib/resolver/AddEnvPlugin.js +++ b/packages/webpack-plugin/lib/resolver/AddEnvPlugin.js @@ -34,7 +34,6 @@ module.exports = class AddEnvPlugin { if (!extname || !matchCondition(resourcePath, this.fileConditionRules)) return callback() const queryObj = parseQuery(request.query || '?') queryObj.infix = `${queryObj.infix || ''}.${env}` - // css | stylus | less | sass 中 import file 过滤query,避免在对应的 loader 中无法读取到文件 obj.query = stringifyQuery(queryObj) obj.path = addInfix(resourcePath, env, extname) obj.relativePath = request.relativePath && addInfix(request.relativePath, env, extname) diff --git a/packages/webpack-plugin/lib/resolver/AddModePlugin.js b/packages/webpack-plugin/lib/resolver/AddModePlugin.js index 9a2bff748..4430a40bc 100644 --- a/packages/webpack-plugin/lib/resolver/AddModePlugin.js +++ b/packages/webpack-plugin/lib/resolver/AddModePlugin.js @@ -43,7 +43,6 @@ module.exports = class AddModePlugin { resolver.doResolve(target, Object.assign({}, request, obj), 'add mode: ' + mode, resolveContext, (err, result) => { if (defaultMode && !result) { queryObj.infix = `${queryInfix || ''}.${defaultMode}` - // css | stylus | less | sass 中 import file 过滤query,避免在对应的 loader 中无法读取到文件 obj.query = stringifyQuery(queryObj) obj.path = addInfix(resourcePath, defaultMode, extname) resolver.doResolve(target, Object.assign({}, request, obj), 'add mode: ' + defaultMode, resolveContext, (err, result) => {