@pdfme/ui 3.0.1-dev.5 → 3.0.1-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -2
- package/dist/index.js.LICENSE.txt +1 -1
- package/package.json +3 -1
- package/webpack.config.js +14 -3
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pdfme/ui",
|
3
|
-
"version": "3.0.1-dev.
|
3
|
+
"version": "3.0.1-dev.8",
|
4
4
|
"sideEffects": false,
|
5
5
|
"author": "hand-dot",
|
6
6
|
"license": "MIT",
|
@@ -67,7 +67,9 @@
|
|
67
67
|
"jest-canvas-mock": "^2.3.1",
|
68
68
|
"process": "^0.11.10",
|
69
69
|
"style-loader": "^3.3.3",
|
70
|
+
"terser-webpack-plugin": "^5.3.9",
|
70
71
|
"webpack": "^5.75.0",
|
72
|
+
"webpack-bundle-analyzer": "^4.9.1",
|
71
73
|
"webpack-cli": "^5.0.1"
|
72
74
|
},
|
73
75
|
"peerDependencies": {
|
package/webpack.config.js
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
const path = require('path');
|
2
2
|
const webpack = require('webpack');
|
3
3
|
const pkg = require('./package.json');
|
4
|
+
const TerserPlugin = require('terser-webpack-plugin');
|
5
|
+
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
4
6
|
|
5
7
|
const isProduction = process.env.NODE_ENV === 'production';
|
6
8
|
|
@@ -12,7 +14,16 @@ const BANNER = [
|
|
12
14
|
].join('\n');
|
13
15
|
|
14
16
|
const config = {
|
15
|
-
|
17
|
+
mode: isProduction ? 'production' : 'development',
|
18
|
+
optimization: {
|
19
|
+
minimize: isProduction,
|
20
|
+
minimizer: isProduction ? [new TerserPlugin({
|
21
|
+
parallel: true,
|
22
|
+
terserOptions: {
|
23
|
+
|
24
|
+
},
|
25
|
+
})] : [],
|
26
|
+
},
|
16
27
|
resolve: {
|
17
28
|
extensions: ['.ts', '.tsx', '.js'],
|
18
29
|
alias: { process: 'process/browser' },
|
@@ -22,7 +33,7 @@ const config = {
|
|
22
33
|
new webpack.ProvidePlugin({ process: 'process/browser' }),
|
23
34
|
new webpack.BannerPlugin({ banner: BANNER, entryOnly: true }),
|
24
35
|
],
|
25
|
-
devtool: 'source-map',
|
36
|
+
devtool: isProduction ? false : 'eval-cheap-module-source-map',
|
26
37
|
entry: './src/index.ts',
|
27
38
|
output: {
|
28
39
|
path: path.resolve(__dirname, 'dist'),
|
@@ -32,7 +43,7 @@ const config = {
|
|
32
43
|
},
|
33
44
|
module: {
|
34
45
|
rules: [
|
35
|
-
{ test: /\.tsx?$/, use: 'ts-loader' },
|
46
|
+
{ test: /\.tsx?$/, use: 'ts-loader', exclude: /node_modules/ },
|
36
47
|
{ test: /\.css$/i, use: ['style-loader', 'css-loader'] }
|
37
48
|
]
|
38
49
|
},
|