-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathwebpack.config.test.js
More file actions
53 lines (51 loc) · 1.21 KB
/
webpack.config.test.js
File metadata and controls
53 lines (51 loc) · 1.21 KB
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
49
50
51
52
53
import HtmlBundlerPlugin from 'html-bundler-webpack-plugin';
import path from 'node:path';
const { dirname } = import.meta;
export default {
mode: 'development',
entry: {
index: path.join(dirname, 'test/index.js'),
},
output: {
path: path.join(dirname, 'test/compiled'),
library: {
name: 'D3Funnel',
type: 'umd',
},
},
resolve: {
extensions: ['.js'],
alias: {
'd3-funnel': path.resolve(dirname, 'src/index.js'),
},
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
},
{
test: /\.s[ac]ss$/i,
use: [
'css-loader',
'sass-loader',
],
},
],
},
plugins: [
new HtmlBundlerPlugin({
entry: {
index: 'test/index.html',
},
js: {
filename: '[name].[contenthash:8].js',
},
css: {
filename: '[name].[contenthash:8].css',
},
}),
],
};