-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 992 Bytes
/
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
var path = require('path');
var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker');
module.exports = {
entry: path.join(__dirname, 'frontend/assets/src/js/index.js'),
output: {
path: path.join(__dirname, 'frontend/assets/dist'),
filename: '[name]-ed53686b-ce2f-4124-bf38-78fc67f877be.js'
},
plugins: [
new BundleTracker({
path: '__dirname',
filename: 'webpack-stats.json'
}),
new webpack.DefinePlugin({
'API_URL': JSON.stringify(process.env.API_URL)
})
],
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.s[ac]ss$/i,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
}
],
},}