-
-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
48 lines (47 loc) · 912 Bytes
/
Copy pathwebpack.dev.js
File metadata and controls
48 lines (47 loc) · 912 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: 'development',
entry: './src/index.js',
devtool: 'inline-source-map',
devServer: {
static: {
directory: path.join(__dirname, 'public'),
},
compress: true,
port: 9000,
hot: true,
open: true,
proxy: [{
context: ['/music/**'],
target: 'http://localhost:8080',
changeOrigin: true,
}],
},
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader', // Use style-loader instead of MiniCssExtractPlugin in dev
{
loader: 'css-loader',
options: { url: false },
},
],
},
],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: 'process/browser.js',
}),
],
output: {
filename: 'audioMotion.js',
path: path.resolve(__dirname, 'public'),
clean: true,
},
};