-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathwebpack.common.js
48 lines (47 loc) · 1.05 KB
/
webpack.common.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
41
42
43
44
45
46
47
48
const path = require('path');
const BundleTracker = require('webpack-bundle-tracker');
module.exports = {
context: __dirname,
entry: './teamvault/static/js/index.js',
output: {
path: path.resolve('./teamvault/static/bundled/'),
filename: "[name]-[fullhash].js",
chunkFilename: "[name]-[fullhash].js"
},
plugins: [
new BundleTracker({path: __dirname + '/teamvault', filename: 'webpack-stats.json'}),
],
resolve: {
extensions: ['*', '.js']
},
module: {
rules: [
{
test: /\.(js|jsx)$/i,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.s[ac]ss$/i,
use: [
"style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
sassOptions: {quietDeps: true},
},
},
],
},
{
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
type: 'asset',
},
],
},
}