File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
native-federation-core/src/lib/utils
native-federation/src/utils Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,17 @@ export function _getPackageInfo(
228
228
229
229
cand = mainPkgJson ?. exports ?. [ relSecondaryPath ] ?. default ;
230
230
if ( cand ) {
231
+
232
+ if ( typeof cand === 'object' ) {
233
+ if ( cand . module ) {
234
+ cand = cand . module ;
235
+ } else if ( cand . default ) {
236
+ cand = cand . default ;
237
+ } else {
238
+ cand = null ;
239
+ }
240
+ }
241
+
231
242
return {
232
243
entryPoint : path . join ( mainPkgPath , cand ) ,
233
244
packageName,
Original file line number Diff line number Diff line change @@ -114,12 +114,6 @@ async function runEsbuild(
114
114
const browsers = getSupportedBrowsers ( projectRoot , context . logger as any ) ;
115
115
const target = transformSupportedBrowsersToTargets ( browsers ) ;
116
116
117
- const optimizeScripts =
118
- ( typeof builderOptions . optimization === 'boolean' &&
119
- builderOptions . optimization ) ||
120
- ( typeof builderOptions . optimization !== 'boolean' &&
121
- builderOptions . optimization . scripts ) ;
122
-
123
117
return await esbuild . build ( {
124
118
entryPoints : [ entryPoint ] ,
125
119
absWorkingDir,
@@ -158,9 +152,7 @@ async function runEsbuild(
158
152
: [ ] ) ,
159
153
] ,
160
154
define : {
161
- ...( optimizeScripts
162
- ? { ngDevMode : 'false' }
163
- : undefined ) ,
155
+ ngDevMode : 'false' ,
164
156
ngJitMode : 'false' ,
165
157
} ,
166
158
} ) ;
You can’t perform that action at this time.
0 commit comments