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,18 +271,20 @@ if (IS_DEV_SERVER) { ...@@ -272,18 +271,20 @@ 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
// new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')),
// watch for changes to our automatic entry point modules
{
apply(compiler) { apply(compiler) {
compiler.plugin('emit', (compilation, callback) => { compiler.hooks.emit.tapAsync('WatchForChangesPlugin', (compilation, callback) => {
compilation.contextDependencies = [ const missingDeps = Array.from(compilation.missingDependencies);
...compilation.contextDependencies, const nodeModulesPath = path.join(ROOT_PATH, 'node_modules');
...watchAutoEntries, const hasMissingNodeModules = missingDeps.some(
]; file => file.indexOf(nodeModulesPath) !== -1
);
// watch for changes to missing node_modules
if (hasMissingNodeModules) compilation.contextDependencies.add(nodeModulesPath);
// watch for changes to automatic entrypoints
watchAutoEntries.forEach(watchPath => compilation.contextDependencies.add(watchPath));
// report our auto-generated bundle count // report our auto-generated bundle count
console.log( console.log(
...@@ -293,8 +294,7 @@ if (IS_DEV_SERVER) { ...@@ -293,8 +294,7 @@ if (IS_DEV_SERVER) {
callback(); 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