fix: plugin sub node_module directory should have higher priority in resolveLoader.modules

in case of interference of unwanted top level dependency hoisting
This commit is contained in:
Haoqun Jiang
2018-09-29 01:44:37 +08:00
parent fed948a738
commit 47a28e0e24
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = (api, options) => {
const cliServicePath = require('path').dirname(require.resolve('@vue/cli-service'))
api.chainWebpack(webpackConfig => {
webpackConfig.resolveLoader.modules.add(path.join(__dirname, 'node_modules'))
webpackConfig.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
const jsRule = webpackConfig.module
.rule('js')
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = (api, options) => {
)
api.chainWebpack(webpackConfig => {
webpackConfig.resolveLoader.modules.add(path.join(__dirname, 'node_modules'))
webpackConfig.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
webpackConfig.module
.rule('eslint')
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = (api, options) => {
const useThreads = process.env.NODE_ENV === 'production' && options.parallel
api.chainWebpack(config => {
config.resolveLoader.modules.add(path.join(__dirname, 'node_modules'))
config.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
if (!options.pages) {
config.entry('app')