-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (33 loc) · 1.14 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
39
40
/* DO NOT edit unless you know what you're doing. */
var path = require("path");
// Bundles all JS files with a random name, and exports the new file to the `temp` directory.
module.exports = {
// Take these files as the source.
entry: {
// The App file contains imports for all the other JS files in the modules directory.
App: "./app/assets/scripts/App.js",
Vendor: "./app/assets/scripts/Vendor.js"
},
// Export bundled file to this location.
output: {
path: path.resolve(__dirname, "./app/temp/scripts"),
filename: "[name].js"
},
// Convert our ES6/Babel into vanilla JS.
module: {
loaders: [
{
loader: "babel-loader",
query: {
// We're using ES6 presets.
// Add more presets to the array if needed.
presets: ["es2015"]
},
// This is regex for JS-only files.
test: /\.js$/,
// This is regex for excluding the node_modules directory.
exclude: /node_modules/
}
]
}
};