@elliemae/pui-cli 8.17.1 → 8.17.2

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.
@@ -69,6 +69,14 @@ const getAdditionalPlugins = () => [
69
69
  })
70
70
  ];
71
71
  const getModuleRules = () => [
72
+ {
73
+ test: /\.(m?js)$/,
74
+ exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile),
75
+ type: "javascript/auto",
76
+ resolve: {
77
+ fullySpecified: false
78
+ }
79
+ },
72
80
  {
73
81
  type: "asset",
74
82
  resourceQuery: /url/
@@ -97,9 +105,15 @@ const webpackFinal = (config, { configType }) => {
97
105
  config.plugins = config?.plugins?.concat((0, import_helpers.getCompressionPlugins)());
98
106
  }
99
107
  if (config.resolve) {
108
+ const aliases = (0, import_helpers.getAlias)();
109
+ const newAliases = Object.keys(aliases).reduce((acc, key) => {
110
+ if (key !== "react" && key !== "react-dom")
111
+ acc[key] = aliases[key];
112
+ return acc;
113
+ }, {});
100
114
  config.resolve.alias = {
101
115
  ...config?.resolve?.alias,
102
- ...(0, import_helpers.getAlias)(),
116
+ ...newAliases,
103
117
  ...(0, import_helpers.getLibraryAlias)(
104
118
  "@reduxjs/toolkit/query/react",
105
119
  "@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"
@@ -123,7 +137,5 @@ const webpackFinal = (config, { configType }) => {
123
137
  const managerWebpack = (config) => {
124
138
  if (config.plugins)
125
139
  config.plugins = config.plugins.concat((0, import_helpers.getCompressionPlugins)());
126
- if (config.resolve)
127
- config.resolve.alias = { ...config.resolve.alias, ...(0, import_helpers.getAlias)() };
128
140
  return config;
129
141
  };
@@ -2,7 +2,13 @@ import webpack from "webpack";
2
2
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
3
3
  import CopyWebpackPlugin from "copy-webpack-plugin";
4
4
  import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
5
- import { getAlias, getLibraryAlias, getCompressionPlugins } from "./helpers.js";
5
+ import {
6
+ getAlias,
7
+ getLibraryAlias,
8
+ getCompressionPlugins,
9
+ excludeNodeModulesExcept,
10
+ modulesToTranspile
11
+ } from "./helpers.js";
6
12
  import { isApp } from "../utils.js";
7
13
  const IS_APP = isApp();
8
14
  const CWD = process.cwd();
@@ -35,6 +41,14 @@ const getAdditionalPlugins = () => [
35
41
  })
36
42
  ];
37
43
  const getModuleRules = () => [
44
+ {
45
+ test: /\.(m?js)$/,
46
+ exclude: excludeNodeModulesExcept(modulesToTranspile),
47
+ type: "javascript/auto",
48
+ resolve: {
49
+ fullySpecified: false
50
+ }
51
+ },
38
52
  {
39
53
  type: "asset",
40
54
  resourceQuery: /url/
@@ -63,9 +77,15 @@ const webpackFinal = (config, { configType }) => {
63
77
  config.plugins = config?.plugins?.concat(getCompressionPlugins());
64
78
  }
65
79
  if (config.resolve) {
80
+ const aliases = getAlias();
81
+ const newAliases = Object.keys(aliases).reduce((acc, key) => {
82
+ if (key !== "react" && key !== "react-dom")
83
+ acc[key] = aliases[key];
84
+ return acc;
85
+ }, {});
66
86
  config.resolve.alias = {
67
87
  ...config?.resolve?.alias,
68
- ...getAlias(),
88
+ ...newAliases,
69
89
  ...getLibraryAlias(
70
90
  "@reduxjs/toolkit/query/react",
71
91
  "@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"
@@ -89,8 +109,6 @@ const webpackFinal = (config, { configType }) => {
89
109
  const managerWebpack = (config) => {
90
110
  if (config.plugins)
91
111
  config.plugins = config.plugins.concat(getCompressionPlugins());
92
- if (config.resolve)
93
- config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
94
112
  return config;
95
113
  };
96
114
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "8.17.1",
3
+ "version": "8.17.2",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "type": "module",