@elliemae/pui-cli 6.0.0-beta.46 → 6.0.0-beta.47
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/lib/transpile/esbuild.js
CHANGED
|
@@ -2,13 +2,14 @@ const esbuild = require('esbuild');
|
|
|
2
2
|
const fg = require('fast-glob');
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
-
const { getPUIConfig } = require('../pui-config');
|
|
5
|
+
// const { getPUIConfig } = require('../pui-config');
|
|
6
|
+
const browserslistToEsbuild = require('browserslist-to-esbuild');
|
|
6
7
|
|
|
7
|
-
const { esBuild } = getPUIConfig();
|
|
8
|
+
// const { esBuild } = getPUIConfig();
|
|
8
9
|
|
|
9
10
|
const commonConfig = {
|
|
10
11
|
bundle: false,
|
|
11
|
-
target:
|
|
12
|
+
target: browserslistToEsbuild(),
|
|
12
13
|
loader: { '.js': 'jsx' },
|
|
13
14
|
mainFields: ['module', 'browser', 'main'],
|
|
14
15
|
inject: [path.resolve(__dirname, './react-shim.js')],
|
|
@@ -9,6 +9,7 @@ const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
|
9
9
|
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
10
10
|
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
|
11
11
|
const { ProvidePlugin } = require('webpack');
|
|
12
|
+
const browserslistToEsbuild = require('browserslist-to-esbuild');
|
|
12
13
|
|
|
13
14
|
const {
|
|
14
15
|
excludeNodeModulesExcept,
|
|
@@ -17,8 +18,8 @@ const {
|
|
|
17
18
|
getAlias,
|
|
18
19
|
getPaths,
|
|
19
20
|
} = require('./helpers');
|
|
20
|
-
const { getPUIConfig } = require('../pui-config');
|
|
21
|
-
const { esBuild } = getPUIConfig();
|
|
21
|
+
// const { getPUIConfig } = require('../pui-config');
|
|
22
|
+
// const { esBuild } = getPUIConfig();
|
|
22
23
|
|
|
23
24
|
const minicssLoader = {
|
|
24
25
|
loader: MiniCssExtractPlugin.loader,
|
|
@@ -153,7 +154,7 @@ module.exports = (options) => ({
|
|
|
153
154
|
loader: 'esbuild-loader',
|
|
154
155
|
options: {
|
|
155
156
|
loader: 'jsx',
|
|
156
|
-
target:
|
|
157
|
+
target: browserslistToEsbuild(),
|
|
157
158
|
},
|
|
158
159
|
},
|
|
159
160
|
},
|
|
@@ -167,7 +168,7 @@ module.exports = (options) => ({
|
|
|
167
168
|
loader: 'esbuild-loader',
|
|
168
169
|
options: {
|
|
169
170
|
loader: 'tsx',
|
|
170
|
-
target:
|
|
171
|
+
target: browserslistToEsbuild(),
|
|
171
172
|
},
|
|
172
173
|
},
|
|
173
174
|
},
|
|
@@ -4,6 +4,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
4
4
|
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
|
5
5
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
6
6
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
7
|
+
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
|
|
8
|
+
|
|
9
|
+
const smp = new SpeedMeasurePlugin({ disable: !process.env.MEASURE });
|
|
7
10
|
|
|
8
11
|
const {
|
|
9
12
|
getAssetPath,
|
|
@@ -114,4 +117,4 @@ const devConfig = {
|
|
|
114
117
|
},
|
|
115
118
|
};
|
|
116
119
|
|
|
117
|
-
module.exports = baseConfigFactory(devConfig);
|
|
120
|
+
module.exports = smp.wrap(baseConfigFactory(devConfig));
|
|
@@ -5,6 +5,7 @@ const { GenerateSW } = require('workbox-webpack-plugin');
|
|
|
5
5
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
6
6
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
7
7
|
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
|
8
|
+
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
|
|
8
9
|
|
|
9
10
|
const baseConfigFactory = require('./webpack.base.babel');
|
|
10
11
|
const {
|
|
@@ -64,10 +65,10 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
|
64
65
|
},
|
|
65
66
|
|
|
66
67
|
plugins: [
|
|
67
|
-
new MiniCssExtractPlugin({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}),
|
|
68
|
+
// new MiniCssExtractPlugin({
|
|
69
|
+
// filename: 'css/[name].[contenthash].css',
|
|
70
|
+
// chunkFilename: 'css/[name].[contenthash].chunk.css',
|
|
71
|
+
// }),
|
|
71
72
|
|
|
72
73
|
...getCompressionPlugins(),
|
|
73
74
|
|
|
@@ -144,6 +145,22 @@ const appVersionConfig = baseConfigFactory(
|
|
|
144
145
|
getProdConfig({ latestVersion: false }),
|
|
145
146
|
);
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
const addSMPPlugin = (config) => {
|
|
149
|
+
const smpConfig = new SpeedMeasurePlugin({
|
|
150
|
+
disable: !process.env.MEASURE,
|
|
151
|
+
}).wrap(config);
|
|
152
|
+
// mini css extract plugin is not working fine with smp
|
|
153
|
+
smpConfig.plugins.push(
|
|
154
|
+
new MiniCssExtractPlugin({
|
|
155
|
+
filename: 'css/[name].[contenthash].css',
|
|
156
|
+
chunkFilename: 'css/[name].[contenthash].chunk.css',
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
return smpConfig;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const config = isVersionedApp
|
|
163
|
+
? [latestVersionConfig, appVersionConfig].map(addSMPPlugin)
|
|
164
|
+
: addSMPPlugin(latestVersionConfig);
|
|
165
|
+
|
|
166
|
+
module.exports = config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.47",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ICE MT UI Platform CLI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -70,16 +70,16 @@
|
|
|
70
70
|
"@semantic-release/changelog": "~6.0.1",
|
|
71
71
|
"@semantic-release/exec": "~6.0.3",
|
|
72
72
|
"@semantic-release/git": "~10.0.1",
|
|
73
|
-
"@storybook/addon-a11y": "~6.4.
|
|
74
|
-
"@storybook/addon-essentials": "~6.4.
|
|
73
|
+
"@storybook/addon-a11y": "~6.4.13",
|
|
74
|
+
"@storybook/addon-essentials": "~6.4.13",
|
|
75
75
|
"@storybook/addon-events": "~6.2.9",
|
|
76
|
-
"@storybook/addon-interactions": "~6.4.
|
|
77
|
-
"@storybook/addon-links": "~6.4.
|
|
78
|
-
"@storybook/addon-storysource": "~6.4.
|
|
79
|
-
"@storybook/builder-webpack5": "~6.4.
|
|
80
|
-
"@storybook/manager-webpack5": "~6.4.
|
|
81
|
-
"@storybook/react": "~6.4.
|
|
82
|
-
"@storybook/theming": "~6.4.
|
|
76
|
+
"@storybook/addon-interactions": "~6.4.13",
|
|
77
|
+
"@storybook/addon-links": "~6.4.13",
|
|
78
|
+
"@storybook/addon-storysource": "~6.4.13",
|
|
79
|
+
"@storybook/builder-webpack5": "~6.4.13",
|
|
80
|
+
"@storybook/manager-webpack5": "~6.4.13",
|
|
81
|
+
"@storybook/react": "~6.4.13",
|
|
82
|
+
"@storybook/theming": "~6.4.13",
|
|
83
83
|
"@stylelint/postcss-css-in-js": "~0.37.2",
|
|
84
84
|
"@svgr/webpack": "~6.2.0",
|
|
85
85
|
"@swc/cli": "~0.1.55",
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"babel-plugin-transform-strip-block": "~0.0.5",
|
|
111
111
|
"body-parser": "~1.19.1",
|
|
112
112
|
"browserslist": "~4.19.1",
|
|
113
|
+
"browserslist-to-esbuild": "~1.1.1",
|
|
113
114
|
"bundlesize": "~0.18.1",
|
|
114
115
|
"case-sensitive-paths-webpack-plugin": "~2.4.0",
|
|
115
116
|
"chalk": "~4.1.2",
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
"css-minimizer-webpack-plugin": "~3.3.1",
|
|
126
127
|
"depcheck": "~1.4.3",
|
|
127
128
|
"docdash": "~1.2.0",
|
|
128
|
-
"dotenv": "~12.0.
|
|
129
|
+
"dotenv": "~12.0.3",
|
|
129
130
|
"dotenv-webpack": "~7.0.3",
|
|
130
131
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
131
132
|
"enhanced-resolve": "~5.8.3",
|
|
@@ -217,6 +218,7 @@
|
|
|
217
218
|
"semantic-release": "~18.0.1",
|
|
218
219
|
"shelljs": "~0.8.5",
|
|
219
220
|
"slackify-markdown": "~4.3.1",
|
|
221
|
+
"speed-measure-webpack-plugin": "~1.5.0",
|
|
220
222
|
"storybook-addon-turbo-build": "~1.0.1",
|
|
221
223
|
"storybook-builder-vite": "~0.1.13",
|
|
222
224
|
"storybook-react-router": "~1.0.8",
|
|
@@ -239,7 +241,7 @@
|
|
|
239
241
|
"url-loader": "~4.1.1",
|
|
240
242
|
"uuid": "~8.3.2",
|
|
241
243
|
"vite": "~2.7.12",
|
|
242
|
-
"vitest": "~0.1.
|
|
244
|
+
"vitest": "~0.1.16",
|
|
243
245
|
"webpack": "~5.66.0",
|
|
244
246
|
"webpack-bundle-analyzer": "~4.5.0",
|
|
245
247
|
"webpack-cli": "~4.9.1",
|