Skip to content

Commit

Permalink
fix: plugin sub node_module directory should have higher priority i…
Browse files Browse the repository at this point in the history
…n `resolveLoader.modules`

in case of interference of unwanted top level dependency hoisting
  • Loading branch information
sodatea committed Sep 28, 2018
1 parent fed948a commit 47a28e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-babel/index.js
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-eslint/index.js
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-typescript/index.js
Expand Up @@ -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')
Expand Down

0 comments on commit 47a28e0

Please sign in to comment.