Skip to content

Commit

Permalink
Merge pull request thelounge#905 from thelounge/greenkeeper/webpack-2…
Browse files Browse the repository at this point in the history
….2.1

Update webpack to the latest version πŸš€
  • Loading branch information
astorije authored Feb 18, 2017
2 parents e9406ac + bfae1ca commit 12b70f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
40 changes: 21 additions & 19 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,36 @@ 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"
]
}
}
},
{
test: /\.tpl$/,
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"
],
}
}
},
]
Expand All @@ -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;

0 comments on commit 12b70f7

Please sign in to comment.