Commit f9e33f43 authored by Mike Greiling's avatar Mike Greiling

update several packages to remove deprecation warnings

parent 94a9c60e
...@@ -7,7 +7,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); ...@@ -7,7 +7,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin');
const NameAllModulesPlugin = require('name-all-modules-plugin'); const NameAllModulesPlugin = require('name-all-modules-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ROOT_PATH = path.resolve(__dirname, '..'); const ROOT_PATH = path.resolve(__dirname, '..');
const IS_PRODUCTION = process.env.NODE_ENV === 'production'; const IS_PRODUCTION = process.env.NODE_ENV === 'production';
...@@ -272,29 +271,30 @@ if (IS_DEV_SERVER) { ...@@ -272,29 +271,30 @@ if (IS_DEV_SERVER) {
hot: DEV_SERVER_LIVERELOAD, hot: DEV_SERVER_LIVERELOAD,
inline: DEV_SERVER_LIVERELOAD, inline: DEV_SERVER_LIVERELOAD,
}; };
config.plugins.push( config.plugins.push({
// watch node_modules for changes if we encounter a missing module compile error apply(compiler) {
// new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')), compiler.hooks.emit.tapAsync('WatchForChangesPlugin', (compilation, callback) => {
const missingDeps = Array.from(compilation.missingDependencies);
const nodeModulesPath = path.join(ROOT_PATH, 'node_modules');
const hasMissingNodeModules = missingDeps.some(
file => file.indexOf(nodeModulesPath) !== -1
);
// watch for changes to our automatic entry point modules // watch for changes to missing node_modules
{ if (hasMissingNodeModules) compilation.contextDependencies.add(nodeModulesPath);
apply(compiler) {
compiler.plugin('emit', (compilation, callback) => {
compilation.contextDependencies = [
...compilation.contextDependencies,
...watchAutoEntries,
];
// report our auto-generated bundle count // watch for changes to automatic entrypoints
console.log( watchAutoEntries.forEach(watchPath => compilation.contextDependencies.add(watchPath));
`${autoEntriesCount} entries from '/pages' automatically added to webpack output.`
);
callback(); // report our auto-generated bundle count
}); console.log(
}, `${autoEntriesCount} entries from '/pages' automatically added to webpack output.`
} );
);
callback();
});
},
});
if (DEV_SERVER_LIVERELOAD) { if (DEV_SERVER_LIVERELOAD) {
config.plugins.push(new webpack.HotModuleReplacementPlugin()); config.plugins.push(new webpack.HotModuleReplacementPlugin());
} }
......
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
"raphael": "^2.2.7", "raphael": "^2.2.7",
"raven-js": "^3.22.1", "raven-js": "^3.22.1",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",
"react-dev-utils": "^5.0.0",
"sanitize-html": "^1.16.1", "sanitize-html": "^1.16.1",
"select2": "3.5.2-browserify", "select2": "3.5.2-browserify",
"sql.js": "^0.4.0", "sql.js": "^0.4.0",
...@@ -92,8 +91,8 @@ ...@@ -92,8 +91,8 @@
"vuex": "^3.0.1", "vuex": "^3.0.1",
"webpack": "^4.6.0", "webpack": "^4.6.0",
"webpack-bundle-analyzer": "^2.11.0", "webpack-bundle-analyzer": "^2.11.0",
"webpack-cli": "^2.0.14", "webpack-cli": "^2.0.15",
"webpack-stats-plugin": "^0.1.5", "webpack-stats-plugin": "^0.2.1",
"worker-loader": "^1.1.1" "worker-loader": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment