Skip to content

Commit 80a3503

Browse files
authored
fix: build on windows (#147)
1 parent 7ed17dd commit 80a3503

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

webpack.config.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
const { DefinePlugin } = require('webpack');
22
const { spawnSync } = require('child_process');
3+
const path = require('path');
34

45
module.exports = (env, argv) => ({
56
entry: './src/components/main.tsx',
67
module: {
78
rules: [
89
{
9-
test: /\.js$/,
10-
include: /node_modules\/undici/,
10+
test: /\.m?js$/,
11+
include: [
12+
path.resolve(__dirname, 'node_modules/undici'),
13+
path.resolve(__dirname, 'node_modules/@distube')
14+
],
1115
use: {
1216
loader: 'babel-loader',
1317
options: {
1418
presets: [
15-
['@babel/preset-env', { targets: { node: 'current' } }]
19+
['@babel/preset-env', {
20+
targets: {
21+
node: 'current',
22+
browsers: ['last 2 versions']
23+
}
24+
}]
1625
],
1726
plugins: [
1827
'@babel/plugin-proposal-class-properties',

0 commit comments

Comments
 (0)