forked from ts-bitcoin/ts-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.ts
More file actions
47 lines (45 loc) · 1.19 KB
/
Copy pathwebpack.config.ts
File metadata and controls
47 lines (45 loc) · 1.19 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
import * as path from 'path'
import { Configuration } from 'webpack'
const EsmWebpackPlugin = require('@purtuga/esm-webpack-plugin')
const config: Configuration = {
entry: './src/index.ts',
output: {
filename: 'bundle.esm.js',
library: 'Bitcoin',
libraryTarget: 'var',
path: path.resolve(__dirname, 'lib'),
},
module: {
rules: [
{
test: /\.ts$/,
use: [
{
loader: 'ts-loader',
options: {
onlyCompileBundledFiles: true,
compilerOptions: {
module: 'esnext',
moduleResolution: 'node',
},
},
},
],
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.ts', '.js'],
},
node: {
fs: 'empty',
},
plugins: [new EsmWebpackPlugin()],
performance: {
hints: false,
maxEntrypointSize: 360000,
maxAssetSize: 360000,
},
}
export default config