Fix nodePath and ignore node_modules files on watch

This commit is contained in:
Marcos Moura 2016-11-16 02:15:17 -02:00
parent 61fadce544
commit 1be254252e
2 changed files with 3 additions and 1 deletions

View file

@ -3,7 +3,7 @@ import path from 'path';
const config = {
projectRoot: path.resolve(__dirname, '../'),
rootPath: path.resolve(__dirname, '../dist'),
nodePath: path.resolve(__dirname, '../node_modules'),
nodePath: path.resolve(__dirname, '../../node_modules'),
docsPath: 'docs',
indexPath: 'docs/index.html',
publicPath: '/',

View file

@ -2,6 +2,7 @@ import webpack from 'webpack';
import merge from 'webpack-merge';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import baseWebpackConfig from './base';
import config from '../config';
Object.keys(baseWebpackConfig.entry).forEach((name) => {
baseWebpackConfig.entry[name] = ['./build/server/client'].concat(baseWebpackConfig.entry[name]);
@ -10,6 +11,7 @@ Object.keys(baseWebpackConfig.entry).forEach((name) => {
export default merge(baseWebpackConfig, {
devtool: '#inline-source-map',
plugins: [
new webpack.WatchIgnorePlugin([config.nodePath]),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new HtmlWebpackPlugin({