-
Notifications
You must be signed in to change notification settings - Fork 31
/
webpack.config.js
38 lines (38 loc) · 1.29 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var path = require("path");
var webpack = require("webpack");
module.exports = {
// This is the main file that should include all other JS files
entry: "./src/scripts/main.coffee",
target: "web",
debug: true,
// We are watching in the gulp.watch, so tell webpack not to watch
watch: false,
// watchDelay: 300,
output: {
path: path.join(__dirname, "dist", "assets"),
publicPath: "/assets/",
// If you want to generate a filename with a hash of the content (for cache-busting)
// filename: "main-[hash].js",
filename: "main.js",
chunkFilename: "[chunkhash].js"
},
resolve: {
// Tell webpack to look for required files in bower and node
modulesDirectories: ['bower_components', 'node_modules'],
},
module: {
loaders: [
{ test: /\.css/, loader: "style-loader!css-loader" },
{ test: /\.gif/, loader: "url-loader?limit=10000&minetype=image/gif" },
{ test: /\.jpg/, loader: "url-loader?limit=10000&minetype=image/jpg" },
{ test: /\.png/, loader: "url-loader?limit=10000&minetype=image/png" },
{ test: /\.js$/, loader: "jsx-loader" },
{ test: /\.coffee$/, loader: "jsx-loader!coffee-loader" }
],
noParse: /\.min\.js/
},
plugins: [
// If you want to minify everything
// new webpack.optimize.UglifyJsPlugin()
]
};