@elliemae/pui-cli 5.17.2 → 6.0.0-beta.3
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/webpack/helpers.js +1 -0
- package/lib/webpack/webpack.base.babel.js +32 -6
- package/lib/webpack/webpack.dev.babel.js +8 -0
- package/lib/webpack/webpack.lib.base.babel.js +1 -1
- package/lib/webpack/webpack.prod.babel.js +6 -13
- package/lib/webpack/webpack.storybook.js +1 -1
- package/package.json +13 -10
package/lib/webpack/helpers.js
CHANGED
|
@@ -8,6 +8,7 @@ const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
|
|
8
8
|
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
9
9
|
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
10
10
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
11
|
+
const { ProvidePlugin } = require('webpack');
|
|
11
12
|
|
|
12
13
|
const {
|
|
13
14
|
excludeNodeModulesExcept,
|
|
@@ -16,6 +17,7 @@ const {
|
|
|
16
17
|
getAlias,
|
|
17
18
|
getPaths,
|
|
18
19
|
getMediaPath,
|
|
20
|
+
ESBUILD_TARGET,
|
|
19
21
|
} = require('./helpers');
|
|
20
22
|
const { isTypeScriptEnabled } = require('../typescript/util');
|
|
21
23
|
|
|
@@ -46,6 +48,10 @@ const plugins = [
|
|
|
46
48
|
APP_CONFIG: getAppConfig(),
|
|
47
49
|
}),
|
|
48
50
|
new CaseSensitivePathsPlugin(),
|
|
51
|
+
// new ESLintPlugin(),
|
|
52
|
+
new ProvidePlugin({
|
|
53
|
+
React: 'react',
|
|
54
|
+
}),
|
|
49
55
|
new CopyWebpackPlugin({
|
|
50
56
|
patterns: [
|
|
51
57
|
{
|
|
@@ -121,7 +127,7 @@ module.exports = (options) => ({
|
|
|
121
127
|
module: {
|
|
122
128
|
rules: [
|
|
123
129
|
{
|
|
124
|
-
test: /\.(jpe?g|png|gif|svg)$/,
|
|
130
|
+
test: /\.(jpe?g|png|gif|svg|ico)$/,
|
|
125
131
|
use: [
|
|
126
132
|
'file-loader',
|
|
127
133
|
{
|
|
@@ -153,17 +159,30 @@ module.exports = (options) => ({
|
|
|
153
159
|
],
|
|
154
160
|
},
|
|
155
161
|
{
|
|
156
|
-
test: /\.(js|
|
|
162
|
+
test: /\.(js|jsx)$/,
|
|
163
|
+
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
164
|
+
resolve: {
|
|
165
|
+
fullySpecified: false,
|
|
166
|
+
},
|
|
167
|
+
use: {
|
|
168
|
+
loader: 'esbuild-loader',
|
|
169
|
+
options: {
|
|
170
|
+
loader: 'jsx',
|
|
171
|
+
target: ESBUILD_TARGET,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
test: /\.(ts|tsx)$/,
|
|
157
177
|
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
158
178
|
resolve: {
|
|
159
179
|
fullySpecified: false,
|
|
160
180
|
},
|
|
161
181
|
use: {
|
|
162
|
-
loader: '
|
|
182
|
+
loader: 'esbuild-loader',
|
|
163
183
|
options: {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
...(options.babelQuery || {}),
|
|
184
|
+
loader: 'tsx',
|
|
185
|
+
target: ESBUILD_TARGET,
|
|
167
186
|
},
|
|
168
187
|
},
|
|
169
188
|
},
|
|
@@ -178,6 +197,13 @@ module.exports = (options) => ({
|
|
|
178
197
|
sourceMap: true,
|
|
179
198
|
},
|
|
180
199
|
},
|
|
200
|
+
{
|
|
201
|
+
loader: 'esbuild-loader',
|
|
202
|
+
options: {
|
|
203
|
+
loader: 'css',
|
|
204
|
+
minify: options.mode === 'production',
|
|
205
|
+
},
|
|
206
|
+
},
|
|
181
207
|
{
|
|
182
208
|
loader: 'postcss-loader',
|
|
183
209
|
options: {
|
|
@@ -26,6 +26,14 @@ const {
|
|
|
26
26
|
const devConfig = {
|
|
27
27
|
mode: 'development',
|
|
28
28
|
|
|
29
|
+
cache: {
|
|
30
|
+
type: 'filesystem',
|
|
31
|
+
allowCollectingMemory: true,
|
|
32
|
+
buildDependencies: {
|
|
33
|
+
config: [__filename],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
|
|
29
37
|
// Add hot reloading in development
|
|
30
38
|
entry: {
|
|
31
39
|
app: [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
1
2
|
const path = require('path');
|
|
2
3
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
3
4
|
const { GenerateSW } = require('workbox-webpack-plugin');
|
|
4
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
5
5
|
const CompressionPlugin = require('compression-webpack-plugin');
|
|
6
6
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
7
|
-
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
8
7
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
8
|
+
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
|
9
9
|
|
|
10
10
|
const baseConfigFactory = require('./webpack.base.babel');
|
|
11
11
|
const {
|
|
@@ -15,6 +15,7 @@ const {
|
|
|
15
15
|
getPaths,
|
|
16
16
|
getAppVersion,
|
|
17
17
|
isGoogleTagManagerEnabled,
|
|
18
|
+
ESBUILD_TARGET,
|
|
18
19
|
} = require('./helpers');
|
|
19
20
|
|
|
20
21
|
const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
@@ -39,17 +40,10 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
|
39
40
|
optimization: {
|
|
40
41
|
moduleIds: 'deterministic',
|
|
41
42
|
minimizer: [
|
|
42
|
-
new
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
comparisons: false,
|
|
46
|
-
},
|
|
47
|
-
format: {
|
|
48
|
-
comments: false,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
43
|
+
new ESBuildMinifyPlugin({
|
|
44
|
+
target: ESBUILD_TARGET,
|
|
45
|
+
css: true,
|
|
51
46
|
}),
|
|
52
|
-
new CssMinimizerPlugin(),
|
|
53
47
|
],
|
|
54
48
|
runtimeChunk: true,
|
|
55
49
|
splitChunks: {
|
|
@@ -120,7 +114,6 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
|
|
|
120
114
|
? 'app/index.html'
|
|
121
115
|
: 'app/index-app-loader.html',
|
|
122
116
|
minify: {
|
|
123
|
-
// eslint-disable-next-line max-lines
|
|
124
117
|
removeComments: true,
|
|
125
118
|
collapseWhitespace: true,
|
|
126
119
|
removeRedundantAttributes: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "EllieMae Platform UI CLI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@testing-library/react": "~12.1.2",
|
|
94
94
|
"@testing-library/react-hooks": "~7.0.2",
|
|
95
95
|
"@types/jest": "~27.0.3",
|
|
96
|
-
"@types/node": "~16.11.
|
|
96
|
+
"@types/node": "~16.11.10",
|
|
97
97
|
"@types/rimraf": "~3.0.2",
|
|
98
98
|
"@types/testing-library__jest-dom": "~5.14.1",
|
|
99
99
|
"@typescript-eslint/eslint-plugin": "~5.4.0",
|
|
@@ -107,7 +107,8 @@
|
|
|
107
107
|
"babel-plugin-import-remove-resource-query": "~1.0.0",
|
|
108
108
|
"babel-plugin-lodash": "~3.3.4",
|
|
109
109
|
"babel-plugin-module-resolver": "~4.1.0",
|
|
110
|
-
"babel-plugin-
|
|
110
|
+
"babel-plugin-source-map-support": "~2.1.3",
|
|
111
|
+
"babel-plugin-styled-components": "~2.0.1",
|
|
111
112
|
"babel-plugin-transform-react-remove-prop-types": "~0.4.24",
|
|
112
113
|
"babel-plugin-transform-remove-console": "~6.9.4",
|
|
113
114
|
"babel-plugin-transform-strip-block": "~0.0.4",
|
|
@@ -125,12 +126,13 @@
|
|
|
125
126
|
"cors": "~2.8.5",
|
|
126
127
|
"cross-env": "~7.0.3",
|
|
127
128
|
"css-loader": "~6.5.1",
|
|
128
|
-
"css-minimizer-webpack-plugin": "~3.
|
|
129
|
+
"css-minimizer-webpack-plugin": "~3.2.0",
|
|
129
130
|
"depcheck": "~1.4.2",
|
|
130
131
|
"docdash": "~1.2.0",
|
|
131
132
|
"dotenv": "~10.0.0",
|
|
132
133
|
"dotenv-webpack": "~7.0.3",
|
|
133
134
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
135
|
+
"esbuild-loader": "~2.16.0",
|
|
134
136
|
"eslint": "~8.3.0",
|
|
135
137
|
"eslint-config-airbnb": "~18.2.1",
|
|
136
138
|
"eslint-config-airbnb-base": "~15.0.0",
|
|
@@ -183,14 +185,14 @@
|
|
|
183
185
|
"nodemon": "~2.0.15",
|
|
184
186
|
"npm-check-updates": "12.0.2",
|
|
185
187
|
"null-loader": "~4.0.1",
|
|
186
|
-
"pino": "~7.4.
|
|
188
|
+
"pino": "~7.4.1",
|
|
187
189
|
"pino-pretty": "~7.2.0",
|
|
188
190
|
"pinst": "~2.1.6",
|
|
189
191
|
"plop": "~2.7.6",
|
|
190
|
-
"postcss": "~8.
|
|
192
|
+
"postcss": "~8.4.1",
|
|
191
193
|
"postcss-jsx": "~0.36.4",
|
|
192
|
-
"postcss-html": "~1.
|
|
193
|
-
"postcss-markdown": "~1.
|
|
194
|
+
"postcss-html": "~1.3.0",
|
|
195
|
+
"postcss-markdown": "~1.2.0",
|
|
194
196
|
"postcss-syntax": "~0.36.2",
|
|
195
197
|
"postcss-loader": "~6.2.0",
|
|
196
198
|
"postcss-preset-env": "~7.0.1",
|
|
@@ -206,10 +208,11 @@
|
|
|
206
208
|
"resize-observer-polyfill": "~1.5.1",
|
|
207
209
|
"rimraf": "~3.0.2",
|
|
208
210
|
"script-loader": "~0.7.2",
|
|
209
|
-
"semantic-release": "~18.0.
|
|
211
|
+
"semantic-release": "~18.0.1",
|
|
210
212
|
"shelljs": "~0.8.4",
|
|
211
213
|
"slackify-markdown": "~4.3.0",
|
|
212
214
|
"storybook-react-router": "~1.0.8",
|
|
215
|
+
"storybook-addon-turbo-build": "~1.0.1",
|
|
213
216
|
"style-loader": "~3.3.1",
|
|
214
217
|
"stylelint": "~14.1.0",
|
|
215
218
|
"stylelint-config-recommended": "~6.0.0",
|
|
@@ -229,7 +232,7 @@
|
|
|
229
232
|
"update-notifier": "~5.1.0",
|
|
230
233
|
"url-loader": "~4.1.1",
|
|
231
234
|
"uuid": "~8.3.2",
|
|
232
|
-
"webpack": "~5.64.
|
|
235
|
+
"webpack": "~5.64.3",
|
|
233
236
|
"webpack-bundle-analyzer": "~4.5.0",
|
|
234
237
|
"webpack-cli": "~4.9.1",
|
|
235
238
|
"webpack-dev-middleware": "~5.2.2",
|