forked from SolidOS/solid-panes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
36 lines (35 loc) · 821 Bytes
/
webpack.config.js
File metadata and controls
36 lines (35 loc) · 821 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
const path = require('path');
const webpack = require('webpack');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = {
entry: './index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'commonjs2',
},
resolve: {
extensions: ['.mjs', '.js', '.ts', '.tsx'],
},
module: {
rules: [
{
test: /\.(mjs|js|ts|tsx)$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
}
}
],
},
plugins: [
new webpack.DefinePlugin({
// Prevent solid-auth-tls (used by solid-ui) from running Node code:
'global.IS_BROWSER': JSON.stringify(true),
}),
new ForkTsCheckerWebpackPlugin(),
],
node: {
fs: 'empty'
}
}