-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (35 loc) · 1.11 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
var path = require('path');
/**
* @see http://webpack.github.io/docs/configuration.html
* for webpack configuration options
*/
module.exports = {
// 'entry' specifies the entry point, where webpack starts reading all
// dependencies listed and bundling them into the output file.
// The entrypoint can be anywhere and named anything - here we are calling it
// '_application' and storing it in the 'javascripts' directory to follow
// Rails conventions.
entry: './app/client/javascripts/entry.jsx',
// 'output' specifies the filepath for saving the bundled output generated by
// wepback.
// It is an object with options, and you can interpolate the name of the entry
// file using '[name]' in the filename.
// You will want to add the bundled filename to your '.gitignore'.
output: {
filename: '[name].bundle.js',
// We want to save the bundle in the same directory as the other JS.
path: __dirname + '/app/assets/javascripts',
},
module: {
rules: [
{
test: /\.jsx?$/,
use: [
{
loader: "babel-loader"
}
],
}
]
}
};