mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 15:40:00 +00:00
Merge remote-tracking branch 'upstream/master' into feature/webpack-bundle-analyzer
Conflicts: config/webpack.production.config.js
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var webpack = require("webpack");
|
||||
var WebpackDevServer = require("webpack-dev-server");
|
||||
var webpackConfig = require("./webpack.config");
|
||||
var webpackConfig = require("./webpack.production.config");
|
||||
var testConfig = require("../test/config/specs");
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ exports.config = {
|
||||
browserName: 'firefox'
|
||||
}],
|
||||
sync: true,
|
||||
logLevel: 'silent',
|
||||
logLevel: 'verbose',
|
||||
coloredLogs: true,
|
||||
bail: 0,
|
||||
screenshotPath: './errorShots/',
|
||||
@@ -29,6 +29,9 @@ exports.config = {
|
||||
services: ['phantomjs'],
|
||||
framework: 'mocha',
|
||||
reporters: ['spec'],
|
||||
phantomjsOpts: {
|
||||
webdriverLogfile: 'phantomjs.log'
|
||||
},
|
||||
mochaOpts: {
|
||||
ui: 'bdd',
|
||||
// Because we don't know how long the initial build will take...
|
||||
@@ -36,9 +39,7 @@ exports.config = {
|
||||
},
|
||||
onPrepare: function (config, capabilities) {
|
||||
var compiler = webpack(webpackConfig);
|
||||
server = new WebpackDevServer(compiler, {
|
||||
stats: "minimal"
|
||||
});
|
||||
server = new WebpackDevServer(compiler, {});
|
||||
server.listen(testConfig.port);
|
||||
},
|
||||
onComplete: function(exitCode) {
|
||||
|
||||
@@ -45,7 +45,13 @@ module.exports = {
|
||||
// serve index.html in place of 404 responses to allow HTML5 history
|
||||
historyApiFallback: true,
|
||||
port: PORT,
|
||||
host: HOST
|
||||
host: HOST,
|
||||
watchOptions: {
|
||||
// Disabled polling by default as it causes lots of CPU usage and hence drains laptop batteries. To enable polling add WEBPACK_DEV_SERVER_POLLING to your environment
|
||||
// See <https://webpack.js.org/configuration/watch/#watchoptions-poll> for details
|
||||
poll: (!!process.env.WEBPACK_DEV_SERVER_POLLING ? true : false),
|
||||
watch: false
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
@@ -59,7 +59,7 @@ module.exports = {
|
||||
tls: 'empty'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.NoErrorsPlugin(),
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: '[chunkhash].vendor.js' }),
|
||||
new WebpackCleanupPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
@@ -80,7 +80,6 @@ module.exports = {
|
||||
template: './src/template.html',
|
||||
title: 'Maputnik'
|
||||
}),
|
||||
new webpack.optimize.DedupePlugin(),
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: 'static',
|
||||
defaultSizes: 'gzip',
|
||||
@@ -88,6 +87,6 @@ module.exports = {
|
||||
generateStatsFile: true,
|
||||
reportFilename: 'bundle-stats.html',
|
||||
statsFilename: 'bundle-stats.json',
|
||||
}),
|
||||
})
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user