Merge pull request #905 from thelounge/greenkeeper/webpack-2.2.1
Update webpack to the latest version 🚀
This commit is contained in:
commit
f21a67b6f5
@ -75,6 +75,6 @@
|
||||
"socket.io-client": "1.7.3",
|
||||
"stylelint": "7.8.0",
|
||||
"urijs": "1.18.7",
|
||||
"webpack": "1.14.0"
|
||||
"webpack": "2.2.1"
|
||||
}
|
||||
}
|
||||
|
@ -26,17 +26,19 @@ let config = {
|
||||
publicPath: "/"
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: [
|
||||
path.resolve(__dirname, "client"),
|
||||
],
|
||||
loader: "babel",
|
||||
query: {
|
||||
presets: [
|
||||
"es2015"
|
||||
]
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
presets: [
|
||||
"es2015"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -44,14 +46,16 @@ let config = {
|
||||
include: [
|
||||
path.resolve(__dirname, "client/views"),
|
||||
],
|
||||
loader: "handlebars-loader",
|
||||
query: {
|
||||
helperDirs: [
|
||||
path.resolve(__dirname, "client/js/libs/handlebars")
|
||||
],
|
||||
extensions: [
|
||||
".tpl"
|
||||
],
|
||||
use: {
|
||||
loader: "handlebars-loader",
|
||||
options: {
|
||||
helperDirs: [
|
||||
path.resolve(__dirname, "client/js/libs/handlebars")
|
||||
],
|
||||
extensions: [
|
||||
".tpl"
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
@ -66,13 +70,11 @@ let config = {
|
||||
// *********************************
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
config.plugins.push(new webpack.optimize.DedupePlugin());
|
||||
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
||||
comments: false,
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
comments: false
|
||||
}));
|
||||
} else {
|
||||
console.log("Building in development mode, bundles will not be minified.");
|
||||
}
|
||||
|
||||
module.exports = config;
|
||||
|
Loading…
Reference in New Issue
Block a user