зеркало из https://github.com/mozilla/normandy.git
Add vendor BundleTracker
This commit is contained in:
Родитель
35e86c0b8a
Коммит
b50df11274
|
@ -10,3 +10,4 @@ site-packages
|
|||
venv
|
||||
webpack-stats.json
|
||||
webpack-stats-actions.json
|
||||
webpack-stats-vendor.json
|
||||
|
|
|
@ -3,6 +3,7 @@ db.sqlite3
|
|||
.DS_Store
|
||||
webpack-stats.json
|
||||
webpack-stats-actions.json
|
||||
webpack-stats-vendor.json
|
||||
__pycache__/
|
||||
/assets/
|
||||
/static/
|
||||
|
|
|
@ -113,6 +113,10 @@ class Core(Configuration):
|
|||
'ACTIONS': {
|
||||
'BUNDLE_DIR_NAME': 'bundles/',
|
||||
'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats-actions.json')
|
||||
},
|
||||
'VENDOR': {
|
||||
'BUNDLE_DIR_NAME': 'bundles/',
|
||||
'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats-vendor.json')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"watch": "webpack --config ./webpack.config.js --watch",
|
||||
"build": "npm run build:vendor && npm run build:app;",
|
||||
"build:app": "webpack --config ./webpack.config.js",
|
||||
"build:vendor": "webpack --config ./vendors.webpack.config.js",
|
||||
"build:vendor": "webpack --config ./vendor.webpack.config.js",
|
||||
"test": "NODE_ENV=production karma start",
|
||||
"lint:js": "eslint normandy client karma.conf.js webpack.config.js *.webpack.config.js",
|
||||
"lint:css": "stylelint 'client/**/*.less' --config .stylelintrc",
|
||||
|
@ -119,6 +119,7 @@
|
|||
"uglifyjs-webpack-plugin": "0.4.6",
|
||||
"webpack": "3.4.0",
|
||||
"webpack-async-await": "1.0.4",
|
||||
"webpack-bundle-tracker": "0.2.0",
|
||||
"yargs": "5.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
/* eslint-env node */
|
||||
/* eslint-disable no-var, func-names, prefer-arrow-callback, prefer-template, comma-dangle */
|
||||
var webpack = require('webpack');
|
||||
var BundleTracker = require('webpack-bundle-tracker');
|
||||
var path = require('path');
|
||||
var UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
var webpack = require('webpack');
|
||||
|
||||
var settings = require('./package.json');
|
||||
|
||||
|
@ -26,6 +27,7 @@ module.exports = {
|
|||
library: 'vendorDLL',
|
||||
},
|
||||
plugins: [
|
||||
new BundleTracker({ filename: './webpack-stats-vendor.json' }),
|
||||
// Compress the resulting bundled file via simple UglifyJS settings.
|
||||
new UglifyJSPlugin({
|
||||
parallel: {
|
Загрузка…
Ссылка в новой задаче