@enact/cli 4.1.6 → 4.1.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 4.1.7 (February 18, 2022)
2
+
3
+ ### pack
4
+
5
+ * Added `additionalModulePaths` to enact options to specify paths to check when resolving modules.
6
+
1
7
  ## 4.1.6 (December 2, 2021)
2
8
 
3
9
  ### pack
@@ -240,7 +246,7 @@ All dependencies updated to latest release.
240
246
  ### pack
241
247
 
242
248
  * Fixed theme feature detection on local theme files (eg. when a local ThemeDecorator is present)
243
- * Fixed bug with `--framework` option with regards to erroneously including unneeded or invalid iLib dependencies and test files.
249
+ * Fixed bug with `--framework` option with regards to erroneously including unneeded or invalid iLib dependencies and test files.
244
250
 
245
251
  ### clean
246
252
 
package/README.md CHANGED
@@ -119,7 +119,7 @@ npm remove -g eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-babel
119
119
 
120
120
  Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
121
121
 
122
- Copyright (c) 2016-2021 LG Electronics
122
+ Copyright (c) 2016-2022 LG Electronics
123
123
 
124
124
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
125
125
 
@@ -162,6 +162,11 @@ module.exports = function (env) {
162
162
  }
163
163
  });
164
164
 
165
+ const getAdditionalModulePaths = paths => {
166
+ if (!paths) return [];
167
+ return Array.isArray(paths) ? paths : [paths];
168
+ };
169
+
165
170
  return {
166
171
  mode: isEnvProduction ? 'production' : 'development',
167
172
  // Don't attempt to continue if there are any errors.
@@ -219,7 +224,11 @@ module.exports = function (env) {
219
224
  ext => useTypeScript || !ext.includes('ts')
220
225
  ),
221
226
  // Allows us to specify paths to check for module resolving.
222
- modules: [path.resolve('./node_modules'), 'node_modules'],
227
+ modules: [
228
+ path.resolve('./node_modules'),
229
+ 'node_modules',
230
+ ...getAdditionalModulePaths(app.additionalModulePaths)
231
+ ],
223
232
  // Don't resolve symlinks to their underlying paths
224
233
  symlinks: false,
225
234
  // Backward compatibility for apps using new ilib references with old Enact