@atlaspack/runtime-js
Advanced tools
Comparing version
@@ -409,5 +409,8 @@ "use strict"; | ||
// This bundle has a conditional dependency, we need to load the bundle group | ||
// Load conditional bundles with helper (and a dev mode with additional hints) | ||
loaderModules.push(`require('./helpers/conditional-loader${options.mode === 'development' ? '-dev' : ''}')('${cond.key}', function (){return Promise.all([${cond.ifTrueBundles.map(targetBundle => getLoaderForBundle(bundle, targetBundle)).join(',')}]);}, function (){return Promise.all([${cond.ifFalseBundles.map(targetBundle => getLoaderForBundle(bundle, targetBundle)).join(',')}]);})`); | ||
const ifTrueLoaders = cond.ifTrueBundles.map(targetBundle => getLoaderForBundle(bundle, targetBundle)); | ||
const ifFalseLoaders = cond.ifFalseBundles.map(targetBundle => getLoaderForBundle(bundle, targetBundle)); | ||
if (ifTrueLoaders.length > 0 || ifFalseLoaders.length > 0) { | ||
// Load conditional bundles with helper (and a dev mode with additional hints) | ||
loaderModules.push(`require('./helpers/conditional-loader${options.mode === 'development' ? '-dev' : ''}')('${cond.key}', function (){return Promise.all([${ifTrueLoaders.join(',')}]);}, function (){return Promise.all([${ifFalseLoaders.join(',')}]);})`); | ||
} | ||
} | ||
@@ -414,0 +417,0 @@ } |
{ | ||
"name": "@atlaspack/runtime-js", | ||
"version": "2.12.1-canary.3567+e0effea53", | ||
"version": "2.12.1-canary.3568+2bb7fb28f", | ||
"license": "(MIT OR Apache-2.0)", | ||
@@ -15,13 +15,13 @@ "publishConfig": { | ||
"engines": { | ||
"atlaspack": "2.12.1-canary.3567+e0effea53", | ||
"atlaspack": "2.12.1-canary.3568+2bb7fb28f", | ||
"node": ">= 16.0.0" | ||
}, | ||
"dependencies": { | ||
"@atlaspack/diagnostic": "2.12.1-canary.3567+e0effea53", | ||
"@atlaspack/feature-flags": "2.12.1-canary.3567+e0effea53", | ||
"@atlaspack/plugin": "2.12.1-canary.3567+e0effea53", | ||
"@atlaspack/utils": "2.12.1-canary.3567+e0effea53", | ||
"@atlaspack/diagnostic": "2.12.1-canary.3568+2bb7fb28f", | ||
"@atlaspack/feature-flags": "2.12.1-canary.3568+2bb7fb28f", | ||
"@atlaspack/plugin": "2.12.1-canary.3568+2bb7fb28f", | ||
"@atlaspack/utils": "2.12.1-canary.3568+2bb7fb28f", | ||
"nullthrows": "^1.1.1" | ||
}, | ||
"gitHead": "e0effea53c21b3c3e3bc9d368468c562e5f80531" | ||
"gitHead": "2bb7fb28f58d6d8e17c7917c4d0be72df125c328" | ||
} |
@@ -486,13 +486,23 @@ // @flow strict-local | ||
// This bundle has a conditional dependency, we need to load the bundle group | ||
const ifTrueLoaders = cond.ifTrueBundles.map((targetBundle) => | ||
getLoaderForBundle(bundle, targetBundle), | ||
); | ||
const ifFalseLoaders = cond.ifFalseBundles.map((targetBundle) => | ||
getLoaderForBundle(bundle, targetBundle), | ||
); | ||
// Load conditional bundles with helper (and a dev mode with additional hints) | ||
loaderModules.push( | ||
`require('./helpers/conditional-loader${ | ||
options.mode === 'development' ? '-dev' : '' | ||
}')('${cond.key}', function (){return Promise.all([${cond.ifTrueBundles | ||
.map((targetBundle) => getLoaderForBundle(bundle, targetBundle)) | ||
.join(',')}]);}, function (){return Promise.all([${cond.ifFalseBundles | ||
.map((targetBundle) => getLoaderForBundle(bundle, targetBundle)) | ||
.join(',')}]);})`, | ||
); | ||
if (ifTrueLoaders.length > 0 || ifFalseLoaders.length > 0) { | ||
// Load conditional bundles with helper (and a dev mode with additional hints) | ||
loaderModules.push( | ||
`require('./helpers/conditional-loader${ | ||
options.mode === 'development' ? '-dev' : '' | ||
}')('${ | ||
cond.key | ||
}', function (){return Promise.all([${ifTrueLoaders.join( | ||
',', | ||
)}]);}, function (){return Promise.all([${ifFalseLoaders.join( | ||
',', | ||
)}]);})`, | ||
); | ||
} | ||
} | ||
@@ -499,0 +509,0 @@ } |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
96156
0.42%2119
0.62%