@elliemae/pui-cli 6.4.0 → 6.5.0

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.
@@ -1,6 +1,7 @@
1
1
  const path = require('path');
2
2
 
3
3
  module.exports = {
4
+ '*.{js,ts,jsx,tsx,md,mdx,html,css,json}': ['prettier --write'],
4
5
  '*.{ts,tsx}': [
5
6
  `node ${path.resolve(
6
7
  __dirname,
@@ -12,5 +13,4 @@ module.exports = {
12
13
  'npm run test:staged',
13
14
  'npm run gendoc',
14
15
  ],
15
- '*.{js,ts,jsx,tsx,md,mdx,html,css,json}': ['prettier --write'],
16
16
  };
@@ -1,6 +1,10 @@
1
1
  /* eslint-disable max-lines */
2
2
  const path = require('path');
3
- const { EnvironmentPlugin, DefinePlugin } = require('webpack');
3
+ const {
4
+ EnvironmentPlugin,
5
+ DefinePlugin,
6
+ NormalModuleReplacementPlugin,
7
+ } = require('webpack');
4
8
  const {
5
9
  optimize: { LimitChunkCountPlugin },
6
10
  ProgressPlugin,
@@ -30,33 +34,43 @@ const minicssLoader = {
30
34
  const finalCSSLoader = (mode) =>
31
35
  mode !== 'production' ? { loader: 'style-loader' } : minicssLoader;
32
36
 
37
+ const copyPluginPatterns = filterByFilePresence([
38
+ {
39
+ from: 'lib/app.config.json',
40
+ to: 'app.config.json',
41
+ noErrorOnMissing: true,
42
+ },
43
+ {
44
+ from: 'public',
45
+ noErrorOnMissing: true,
46
+ },
47
+ ]);
48
+
33
49
  const plugins = [
34
50
  new EnvironmentPlugin({
35
- NODE_ENV: 'development',
36
51
  ASSET_PATH: '/',
37
52
  CI: 'false',
38
53
  }),
39
54
  new DefinePlugin({
40
55
  APP_CONFIG: getAppConfig(true),
41
56
  }),
42
- new CopyWebpackPlugin({
43
- patterns: filterByFilePresence([
44
- {
45
- from: 'lib/app.config.json',
46
- to: 'app.config.json',
47
- noErrorOnMissing: true,
48
- },
49
- {
50
- from: 'lib/public',
51
- noErrorOnMissing: true,
52
- },
53
- ]),
54
- }),
57
+ /* eslint-disable indent */
58
+ ...(copyPluginPatterns.length > 0
59
+ ? [
60
+ new CopyWebpackPlugin({
61
+ patterns: copyPluginPatterns,
62
+ }),
63
+ ]
64
+ : []),
65
+ /* eslint-enable indent */
55
66
  new DuplicatePackageCheckerPlugin(),
56
67
  new LimitChunkCountPlugin({
57
68
  maxChunks: 1,
58
69
  }),
59
70
  new MomentLocalesPlugin({ localesToKeep: ['es-us'] }),
71
+ new NormalModuleReplacementPlugin(/\.js$/, function (resource) {
72
+ resource.request = resource.request.replace('.js', '');
73
+ }),
60
74
  new ProgressPlugin(),
61
75
  ];
62
76
 
@@ -102,25 +116,6 @@ module.exports = (options) => ({
102
116
  },
103
117
  },
104
118
  },
105
- {
106
- test: /\.exec\.js$/,
107
- exclude: /node_modules/,
108
- use: [
109
- {
110
- loader: 'imports-loader',
111
- options: {
112
- wrapper: {
113
- thisArg: 'window',
114
- args: {
115
- module: false,
116
- exports: false,
117
- define: false,
118
- },
119
- },
120
- },
121
- },
122
- ],
123
- },
124
119
  {
125
120
  test: /\.css$/,
126
121
  exclude: excludeNodeModulesExcept(modulesToTranspile),
@@ -191,7 +186,7 @@ module.exports = (options) => ({
191
186
  plugins: plugins.concat(options.plugins || []),
192
187
  resolve: {
193
188
  modules: ['node_modules', 'app', 'lib'],
194
- extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.wasm', '.mjs'],
189
+ extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.wasm', '.mjs'],
195
190
  mainFields: ['browser', 'module', 'main'],
196
191
  alias: {
197
192
  ...getAlias(),
@@ -8,7 +8,6 @@ const libraryName = getLibraryName();
8
8
  module.exports = require('./webpack.lib.base.babel')({
9
9
  mode: 'development',
10
10
 
11
- // Don't use hashes in dev mode for better performance
12
11
  output: {
13
12
  filename: `js/${libraryName}.js`,
14
13
  chunkFilename: `js/${libraryName}.chunk.js`,
@@ -25,7 +24,6 @@ module.exports = require('./webpack.lib.base.babel')({
25
24
  alias: {},
26
25
  },
27
26
 
28
- // Add development plugins
29
27
  plugins: [
30
28
  new HtmlWebpackPlugin({
31
29
  scriptLoading: 'module',
@@ -11,7 +11,6 @@ const libraryName = getLibraryName();
11
11
  module.exports = require('./webpack.lib.base.babel')({
12
12
  mode: 'production',
13
13
 
14
- // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
15
14
  output: {
16
15
  filename: `js/${libraryName}.[chunkhash].js`,
17
16
  chunkFilename: `js/${libraryName}.[chunkhash].chunk.js`,
@@ -36,7 +35,6 @@ module.exports = require('./webpack.lib.base.babel')({
36
35
  },
37
36
 
38
37
  plugins: [
39
- // Minify and optimize the index.html
40
38
  new HtmlWebpackPlugin({
41
39
  scriptLoading: 'module',
42
40
  template: 'lib/index.pug',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.4.0",
3
+ "version": "6.5.0",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -158,7 +158,7 @@
158
158
  "execa": "~5.1.1",
159
159
  "express": "~4.17.2",
160
160
  "express-pino-logger": "~7.0.0",
161
- "express-static-gzip": "~2.1.3",
161
+ "express-static-gzip": "~2.1.4",
162
162
  "favicons": "~6.2.2",
163
163
  "favicons-webpack-plugin": "~5.0.2",
164
164
  "happy-dom": "~2.31.1",
@@ -221,12 +221,12 @@
221
221
  "swc-loader": "~0.1.15",
222
222
  "terser-webpack-plugin": "~5.3.1",
223
223
  "ts-node": "~10.5.0",
224
- "tsc-alias": "~1.5.0",
224
+ "tsc-alias": "~1.6.0",
225
225
  "typescript": "~4.5.5",
226
226
  "update-notifier": "~5.1.0",
227
227
  "url-loader": "~4.1.1",
228
228
  "uuid": "~8.3.2",
229
- "vite": "~2.8.0",
229
+ "vite": "~2.8.1",
230
230
  "vitest": "~0.3.2",
231
231
  "webpack": "~5.65.0",
232
232
  "webpack-bundle-analyzer": "~4.5.0",