-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (34 loc) · 1.1 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
//var ExtractTextPlugin = require("extract-text-webpack-plugin");
var path = require('path');
var webpack = require("webpack");
module.exports = {
entry: "./web/static/js/app.js",
output: {
path: "./priv/static/js",
filename: "app.js"
},
resolve: {
root: [path.join(__dirname, "bower_components")]
},
module: {
loaders: [
{ test: /\.js$/, loaders: ["uglify-loader", "babel-loader"] },
{ test: /\.coffee$/, loader: "coffee-loader" },
{ test: /\.(jpg|png)$/, loader: "url?limit=8192"},
{ test: /\.(coffee\.md|litcoffee)$/, loader: "coffee-loader?literate" },
{
test: /\.scss$/,
loaders: ["style", "css", "autoprefixer?browsers=last 5 versions", "sass??outputStyle=expanded&" +
"includePaths[]=" +
encodeURIComponent(path.resolve(__dirname, "./web/static/css"))]
}
]
},
plugins: [
//new webpack.optimize.CommonsChunkPlugin('common.js'),
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
)
//new ExtractTextPlugin("[name].css")
]
};