Skip to content

Commit

Permalink
renaming our workaround env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Feb 5, 2025
1 parent d0cf3c6 commit df96dfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function emberBuild(command: string, mode: string, resolvableExtensions:
env['EMBROIDER_RESOLVABLE_EXTENSIONS'] = resolvableExtensions?.join(',');
}

if (command === 'build' || process.env.FORCE_EMBER_CLI_EXIT) {
if (command === 'build') {
return new Promise((resolve, reject) => {
const child = fork(
'./node_modules/ember-cli/bin/ember',
Expand Down Expand Up @@ -54,7 +54,7 @@ export function compatPrebuild(): Plugin {
name: 'embroider-builder',
enforce: 'pre',
config(config, { mode, command }) {
viteCommand = command;
viteCommand = process.env.EMBROIDER_VITE_COMMAND ?? command;
viteMode = mode;
resolvableExtensions = config.resolve?.extensions;
},
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/vite-dep-optimizer-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ app.forEachScenario(scenario => {
await execa('pnpm', ['vite', 'optimize', '--force'], {
cwd: app.dir,
env: {
FORCE_EMBER_CLI_EXIT: 'true',
EMBROIDER_VITE_COMMAND: 'build',
},
});
assert.ok(existsSync(join(app.dir, 'node_modules', '.vite')));
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/vite-internals-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function runViteInternalsTest(scenario: Scenario) {
test('vite optimize should succeed', async function (assert) {
let result = await app.execute('pnpm vite optimize --force', {
env: {
FORCE_EMBER_CLI_EXIT: 'true',
EMBROIDER_VITE_COMMAND: 'build',
},
});

Expand Down

0 comments on commit df96dfb

Please sign in to comment.