forked from eidam/cf-workers-status-page
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
39 lines (38 loc) · 872 Bytes
/
webpack.config.js
File metadata and controls
39 lines (38 loc) · 872 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
const path = require('path')
// const { EnvironmentPlugin } = require("webpack")
// const nodeExternals = require('webpack-node-externals')
module.exports = {
entry: './src/index.ts',
output: {
filename: 'worker.js',
path: path.join(__dirname, 'dist'),
},
target: 'webworker',
devtool: 'cheap-module-source-map',
mode: 'development',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
// externalsPresets: { node: true },
// externals: [nodeExternals()],
optimization: {
minimize: false,
},
module: {
rules: [
{
test: /\.ts?$/,
loader: 'ts-loader',
options: {
// transpileOnly is useful to skip typescript checks occasionally:
// transpileOnly: true,
},
},
{
test: /\.ya?ml$/,
type: 'json',
use: 'yaml-loader'
},
],
},
}