@atlaspack/bundler-default 2.13.2-canary.3691 → 2.13.2-canary.3692

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.
@@ -38,14 +38,18 @@ function addJSMonolithBundle(bundleGraph, entryAsset, entryDep) {
38
38
  }
39
39
  let assets = bundleGraph.getDependencyAssets(dependency);
40
40
  for (const asset of assets) {
41
- // For assets marked as isolated, we create new bundles and let other
42
- // plugins like optimizers include them in the primary bundle
43
41
  if (asset.bundleBehavior === 'isolated') {
42
+ throw new Error('Isolated assets are not supported for single file output builds');
43
+ }
44
+
45
+ // For assets marked as inline, we create new bundles and let other
46
+ // plugins like optimizers include them in the primary bundle
47
+ if (asset.bundleBehavior === 'inline') {
44
48
  // Create a new bundle to hold the isolated asset
45
49
  let isolatedBundle = bundleGraph.createBundle({
46
50
  entryAsset: asset,
47
51
  target,
48
- bundleBehavior: 'isolated'
52
+ bundleBehavior: asset.bundleBehavior
49
53
  });
50
54
  bundleGraph.addAssetToBundle(asset, isolatedBundle);
51
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/bundler-default",
3
- "version": "2.13.2-canary.3691+67df3f1af",
3
+ "version": "2.13.2-canary.3692+50265fdf4",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -12,17 +12,17 @@
12
12
  "main": "lib/DefaultBundler.js",
13
13
  "source": "src/DefaultBundler.js",
14
14
  "engines": {
15
- "atlaspack": "2.13.2-canary.3691+67df3f1af",
15
+ "atlaspack": "2.13.2-canary.3692+50265fdf4",
16
16
  "node": ">= 16.0.0"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.13.2-canary.3691+67df3f1af",
20
- "@atlaspack/feature-flags": "2.13.2-canary.3691+67df3f1af",
21
- "@atlaspack/graph": "3.3.2-canary.3691+67df3f1af",
22
- "@atlaspack/plugin": "2.13.2-canary.3691+67df3f1af",
23
- "@atlaspack/rust": "2.13.2-canary.3691+67df3f1af",
24
- "@atlaspack/utils": "2.13.2-canary.3691+67df3f1af",
19
+ "@atlaspack/diagnostic": "2.13.2-canary.3692+50265fdf4",
20
+ "@atlaspack/feature-flags": "2.13.2-canary.3692+50265fdf4",
21
+ "@atlaspack/graph": "3.3.2-canary.3692+50265fdf4",
22
+ "@atlaspack/plugin": "2.13.2-canary.3692+50265fdf4",
23
+ "@atlaspack/rust": "2.13.2-canary.3692+50265fdf4",
24
+ "@atlaspack/utils": "2.13.2-canary.3692+50265fdf4",
25
25
  "nullthrows": "^1.1.1"
26
26
  },
27
- "gitHead": "67df3f1af1432d77ee6b8850010d976d3313693a"
27
+ "gitHead": "50265fdf4024ec18439e85b472aa77a7952e2e08"
28
28
  }
@@ -39,14 +39,20 @@ export function addJSMonolithBundle(
39
39
  let assets = bundleGraph.getDependencyAssets(dependency);
40
40
 
41
41
  for (const asset of assets) {
42
- // For assets marked as isolated, we create new bundles and let other
43
- // plugins like optimizers include them in the primary bundle
44
42
  if (asset.bundleBehavior === 'isolated') {
43
+ throw new Error(
44
+ 'Isolated assets are not supported for single file output builds',
45
+ );
46
+ }
47
+
48
+ // For assets marked as inline, we create new bundles and let other
49
+ // plugins like optimizers include them in the primary bundle
50
+ if (asset.bundleBehavior === 'inline') {
45
51
  // Create a new bundle to hold the isolated asset
46
52
  let isolatedBundle = bundleGraph.createBundle({
47
53
  entryAsset: asset,
48
54
  target,
49
- bundleBehavior: 'isolated',
55
+ bundleBehavior: asset.bundleBehavior,
50
56
  });
51
57
 
52
58
  bundleGraph.addAssetToBundle(asset, isolatedBundle);