Skip to content

Commit

Permalink
feat(virtual test-support.css): in compat-app-builder, replace genera…
Browse files Browse the repository at this point in the history
…tion of test-support.css with the virtual entrypoint
  • Loading branch information
BlueCutOfficial committed Apr 10, 2024
1 parent cabe100 commit 2b91aa0
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,7 @@ export class CompatAppBuilder {
// virtual test-support.js
html.insertScriptTag(html.implicitTestScripts, '@embroider/core/test-support.js');

let implicitTestStylesAsset = this.implicitTestStylesAsset(prepared, parentEngine);
if (implicitTestStylesAsset) {
html.insertStyleLink(html.implicitTestStyles, implicitTestStylesAsset.relativePath);
}
html.insertStyleLink(html.implicitTestStyles, '@embroider/core/test-support.css');
}

private implicitScriptsAsset(
Expand All @@ -553,21 +550,6 @@ export class CompatAppBuilder {
return asset;
}

private implicitTestStylesAsset(
prepared: Map<string, InternalAsset>,
application: AppFiles
): InternalAsset | undefined {
let asset = prepared.get('assets/test-support.css');
if (!asset) {
let implicitTestStyles = this.impliedAssets('implicit-test-styles', application);
if (implicitTestStyles.length > 0) {
asset = new ConcatenatedAsset('assets/test-support.css', implicitTestStyles, this.resolvableExtensionsPattern);
prepared.set(asset.relativePath, asset);
}
}
return asset;
}

// recurse to find all active addons that don't cross an engine boundary.
// Inner engines themselves will be returned, but not those engines' children.
// The output set's insertion order is the proper ember-cli compatible
Expand Down

0 comments on commit 2b91aa0

Please sign in to comment.