mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
[webpack] include project node_modules
dir
This commit is contained in:
parent
8db6964dc5
commit
083f4c26bf
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
const vueLoaderConfig = require('./vue-loader.config')
|
const vueLoaderConfig = require('./vue-loader.config')
|
||||||
const { defaults } = require('lodash')
|
const { defaults } = require('lodash')
|
||||||
const { join } = require('path')
|
const { join, resolve } = require('path')
|
||||||
const { urlJoin } = require('../../utils')
|
const { urlJoin } = require('../../utils')
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -14,7 +14,8 @@ const { urlJoin } = require('../../utils')
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
const nodeModulesDir = join(__dirname, '..', '..', '..', 'node_modules')
|
const nodeModulesDir = resolve(__dirname, '..', '..', '..', 'node_modules')
|
||||||
|
const projectNodeModulesDir = resolve(nodeModulesDir, '..', '..', '..', 'node_modules')
|
||||||
let config = {
|
let config = {
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
entry: {
|
entry: {
|
||||||
@ -39,12 +40,14 @@ module.exports = function () {
|
|||||||
},
|
},
|
||||||
modules: [
|
modules: [
|
||||||
nodeModulesDir,
|
nodeModulesDir,
|
||||||
|
projectNodeModulesDir,
|
||||||
join(this.dir, 'node_modules')
|
join(this.dir, 'node_modules')
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
resolveLoader: {
|
resolveLoader: {
|
||||||
modules: [
|
modules: [
|
||||||
nodeModulesDir,
|
nodeModulesDir,
|
||||||
|
projectNodeModulesDir,
|
||||||
join(this.dir, 'node_modules')
|
join(this.dir, 'node_modules')
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user