Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify virtual entrypoint #1927

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions packages/core/src/virtual-entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export function renderEntrypoint(
Object.assign(params, {
autoRun: resolver.options.autoRun,
appBoot,
mainModule: './app',
});
}

Expand Down Expand Up @@ -243,31 +242,17 @@ w._embroiderEngineBundles_ = [
{{/if}}

{{#if autoRun ~}}
if (!runningTests) {
i("{{js-string-escape mainModule}}").default.create(environment.APP);
}
i("./app").default.create(environment.APP);
{{else if appBoot ~}}
{{ appBoot }}
{{/if}}

{{#if testSuffix ~}}
{{!- TODO: both of these suffixes should get dynamically generated so they incorporate
any content-for added by addons. -}}


{{!- this is the traditional tests-suffix.js -}}
i('../tests/test-helper');
EmberENV.TESTS_FILE_LOADED = true;
{{/if}}
`) as (params: {
amdModules: { runtime: string; buildtime: string }[];
fastbootOnlyAmdModules?: { runtime: string; buildtime: string }[];
defineModulesFrom?: string;
eagerModules?: string[];
autoRun?: boolean;
appBoot?: string;
mainModule?: string;
testSuffix?: boolean;
lazyRoutes?: { names: string[]; path: string }[];
lazyEngines?: { names: string[]; path: string }[];
styles?: { path: string }[];
Expand Down