-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
35 lines (34 loc) · 1.13 KB
/
webpack.config.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
const path = require('path');
module.exports = [
{
entry: {
'form-default': './src/form-default.ts',
'form-material': './src/form-material.ts',
'form-bootstrap': './src/form-bootstrap.ts',
'plugins/mapbox': './src/plugins/mapbox.ts',
'plugins/leaflet': './src/plugins/leaflet.ts',
'plugins/fixed-list': './src/plugins/fixed-list.ts',
'plugins/file-upload': './src/plugins/file-upload.ts',
},
experiments: { outputModule: true },
output: {
filename: '[name].js',
library: { type: 'module' },
},
externals: /^mdui/i,
module: {
rules: [
{ test: /\.tsx?$/, use: 'ts-loader' },
{ test: /\.css(\?raw)?$/i, use: ['raw-loader'] },
],
},
resolve: { extensions: ['.tsx', '.ts', '.js'] },
devServer: {
static: [ { directory: path.join(__dirname, 'demo'), serveIndex: true } ],
compress: true,
hot: true,
port: 8080,
},
// devtool: "source-map",
},
];