Commit 60bc0fc1 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch '33902-upgrade-to-webpack-v3' into 'master'

Upgrade to webpack v3.4.0

Closes #33902

See merge request !12298
parents dd3d4221 669ff236
...@@ -398,3 +398,9 @@ ...@@ -398,3 +398,9 @@
:why: https://github.com/remy/undefsafe/blob/master/LICENSE :why: https://github.com/remy/undefsafe/blob/master/LICENSE
:versions: [] :versions: []
:when: 2017-04-10 06:30:00.002555000 Z :when: 2017-04-10 06:30:00.002555000 Z
- - :approve
- thunky
- :who: Mike Greiling
:why: https://github.com/mafintosh/thunky/blob/master/README.md#license
:versions: []
:when: 2017-08-07 05:56:09.907045000 Z
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
var webpack = require('webpack'); var webpack = require('webpack');
var StatsPlugin = require('stats-webpack-plugin'); var StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
var CompressionPlugin = require('compression-webpack-plugin'); var CompressionPlugin = require('compression-webpack-plugin');
var NameAllModulesPlugin = require('name-all-modules-plugin'); var NameAllModulesPlugin = require('name-all-modules-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
...@@ -128,12 +128,18 @@ var config = { ...@@ -128,12 +128,18 @@ var config = {
plugins: [ plugins: [
// manifest filename must match config.webpack.manifest_filename // manifest filename must match config.webpack.manifest_filename
// webpack-rails only needs assetsByChunkName to function properly // webpack-rails only needs assetsByChunkName to function properly
new StatsPlugin('manifest.json', { new StatsWriterPlugin({
filename: 'manifest.json',
transform: function(data, opts) {
var stats = opts.compiler.getStats().toJson({
chunkModules: false, chunkModules: false,
source: false, source: false,
chunks: false, chunks: false,
modules: false, modules: false,
assets: true assets: true
});
return JSON.stringify(stats, null, 2);
}
}), }),
// prevent pikaday from including moment.js // prevent pikaday from including moment.js
...@@ -252,6 +258,7 @@ if (IS_DEV_SERVER) { ...@@ -252,6 +258,7 @@ if (IS_DEV_SERVER) {
config.devServer = { config.devServer = {
host: DEV_SERVER_HOST, host: DEV_SERVER_HOST,
port: DEV_SERVER_PORT, port: DEV_SERVER_PORT,
disableHostCheck: true,
headers: { 'Access-Control-Allow-Origin': '*' }, headers: { 'Access-Control-Allow-Origin': '*' },
stats: 'errors-only', stats: 'errors-only',
hot: DEV_SERVER_LIVERELOAD, hot: DEV_SERVER_LIVERELOAD,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"dependencies": { "dependencies": {
"babel-core": "^6.22.1", "babel-core": "^6.22.1",
"babel-eslint": "^7.2.1", "babel-eslint": "^7.2.1",
"babel-loader": "^6.2.10", "babel-loader": "^7.1.1",
"babel-plugin-transform-define": "^1.2.0", "babel-plugin-transform-define": "^1.2.0",
"babel-preset-latest": "^6.24.0", "babel-preset-latest": "^6.24.0",
"babel-preset-stage-2": "^6.22.0", "babel-preset-stage-2": "^6.22.0",
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
"react-dev-utils": "^0.5.2", "react-dev-utils": "^0.5.2",
"select2": "3.5.2-browserify", "select2": "3.5.2-browserify",
"sql.js": "^0.4.0", "sql.js": "^0.4.0",
"stats-webpack-plugin": "^0.4.3",
"three": "^0.84.0", "three": "^0.84.0",
"three-orbit-controls": "^82.1.0", "three-orbit-controls": "^82.1.0",
"three-stl-loader": "^1.0.4", "three-stl-loader": "^1.0.4",
...@@ -60,14 +59,15 @@ ...@@ -60,14 +59,15 @@
"vue-loader": "^11.3.4", "vue-loader": "^11.3.4",
"vue-resource": "^1.3.4", "vue-resource": "^1.3.4",
"vue-template-compiler": "^2.2.6", "vue-template-compiler": "^2.2.6",
"webpack": "^2.6.1", "webpack": "^3.4.0",
"webpack-bundle-analyzer": "^2.8.2" "webpack-bundle-analyzer": "^2.8.2",
"webpack-stats-plugin": "^0.1.5"
}, },
"devDependencies": { "devDependencies": {
"babel-plugin-istanbul": "^4.0.0", "babel-plugin-istanbul": "^4.0.0",
"eslint": "^3.10.1", "eslint": "^3.10.1",
"eslint-config-airbnb-base": "^10.0.1", "eslint-config-airbnb-base": "^10.0.1",
"eslint-import-resolver-webpack": "^0.8.1", "eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-filenames": "^1.1.0", "eslint-plugin-filenames": "^1.1.0",
"eslint-plugin-import": "^2.2.0", "eslint-plugin-import": "^2.2.0",
"eslint-plugin-jasmine": "^2.1.0", "eslint-plugin-jasmine": "^2.1.0",
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
"karma-jasmine": "^1.1.0", "karma-jasmine": "^1.1.0",
"karma-mocha-reporter": "^2.2.2", "karma-mocha-reporter": "^2.2.2",
"karma-sourcemap-loader": "^0.3.7", "karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2", "karma-webpack": "^2.0.4",
"nodemon": "^1.11.0", "nodemon": "^1.11.0",
"webpack-dev-server": "^2.4.2" "webpack-dev-server": "^2.6.1"
} }
} }
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