Skip to content

Commit 1be2542

Browse files
committed
Fix nodePath and ignore node_modules files on watch
1 parent 61fadce commit 1be2542

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
const config = {
44
projectRoot: path.resolve(__dirname, '../'),
55
rootPath: path.resolve(__dirname, '../dist'),
6-
nodePath: path.resolve(__dirname, '../node_modules'),
6+
nodePath: path.resolve(__dirname, '../../node_modules'),
77
docsPath: 'docs',
88
indexPath: 'docs/index.html',
99
publicPath: '/',

build/webpack/dev.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import webpack from 'webpack';
22
import merge from 'webpack-merge';
33
import HtmlWebpackPlugin from 'html-webpack-plugin';
44
import baseWebpackConfig from './base';
5+
import config from '../config';
56

67
Object.keys(baseWebpackConfig.entry).forEach((name) => {
78
baseWebpackConfig.entry[name] = ['./build/server/client'].concat(baseWebpackConfig.entry[name]);
@@ -10,6 +11,7 @@ Object.keys(baseWebpackConfig.entry).forEach((name) => {
1011
export default merge(baseWebpackConfig, {
1112
devtool: '#inline-source-map',
1213
plugins: [
14+
new webpack.WatchIgnorePlugin([config.nodePath]),
1315
new webpack.HotModuleReplacementPlugin(),
1416
new webpack.NoErrorsPlugin(),
1517
new HtmlWebpackPlugin({

0 commit comments

Comments
 (0)