-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathwebpack.config.js
More file actions
34 lines (33 loc) · 917 Bytes
/
webpack.config.js
File metadata and controls
34 lines (33 loc) · 917 Bytes
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 path = require("path");
var webpack = require('webpack');
module.exports = {
context: __dirname,
entry: {
devise: "./app/frontend/javascripts/devise.coffee",
application: "./app/frontend/javascripts/application.cjsx",
},
output: {
path: path.join(__dirname, 'app', 'assets', 'javascripts'),
filename: "[name]_bundle.js",
publicPath: "/assets",
devtoolModuleFilenameTemplate: '[resourcePath]',
devtoolFallbackModuleFilenameTemplate: '[resourcePath]?[hash]'
},
resolve: {
extensions: ["", ".jsx", ".cjsx", ".coffee", ".js"]
},
module: {
loaders: [
{ test: /\.cjsx$/, loaders: ["coffee", "cjsx"]},
{ test: /\.coffee$/, loader: "coffee-loader"}
]
},
plugins: [
new webpack.ProvidePlugin({
'React': 'react',
'ReactDom': 'react-dom',
'_': 'lodash'
}),
new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/])
]
}