2018-03-21 16:56:30 +01:00
|
|
|
var path = require('path');
|
2018-02-24 23:55:06 +01:00
|
|
|
var webpack = require('webpack');
|
|
|
|
|
|
|
|
module.exports = {
|
2018-03-21 16:56:30 +01:00
|
|
|
mode: "development",
|
2018-02-24 23:55:06 +01:00
|
|
|
plugins: [
|
|
|
|
// http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
// Automtically detect jQuery and $ as free var in modules
|
|
|
|
// and inject the jquery library
|
|
|
|
// This is required by many jquery plugins
|
|
|
|
jquery: "jquery",
|
|
|
|
jQuery: "jquery",
|
|
|
|
$: "jquery"
|
|
|
|
}),
|
|
|
|
],
|
2018-03-21 16:56:30 +01:00
|
|
|
target: "web",
|
2018-02-24 23:55:06 +01:00
|
|
|
entry: "./src/engine.js",
|
2018-03-21 16:56:30 +01:00
|
|
|
devtool: "nosources-source-map",
|
2018-02-24 23:55:06 +01:00
|
|
|
output: {
|
2018-03-21 16:56:30 +01:00
|
|
|
path: path.resolve(__dirname, "dist"),
|
|
|
|
filename: "bundle.js",
|
|
|
|
devtoolModuleFilenameTemplate: "[id]"
|
2018-02-24 23:55:06 +01:00
|
|
|
},
|
|
|
|
module: {
|
2018-03-21 16:56:30 +01:00
|
|
|
rules: [
|
|
|
|
/* {
|
|
|
|
test: /\.css$/,
|
|
|
|
use: "style!css"
|
|
|
|
}*/
|
2018-02-24 23:55:06 +01:00
|
|
|
]
|
2018-03-21 16:56:30 +01:00
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
removeAvailableModules: true,
|
|
|
|
removeEmptyChunks: true,
|
|
|
|
mergeDuplicateChunks: true,
|
|
|
|
flagIncludedChunks: true,
|
|
|
|
occurrenceOrder: true,
|
|
|
|
sideEffects: true,
|
|
|
|
providedExports: false,
|
|
|
|
usedExports: false,
|
|
|
|
concatenateModules: false,
|
|
|
|
namedModules: false,
|
|
|
|
namedChunks: false,
|
|
|
|
minimize: false,
|
|
|
|
portableRecords: true
|
2018-02-24 23:55:06 +01:00
|
|
|
}
|
|
|
|
};
|