Skip to content

Commit

Permalink
fix targets path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Dec 5, 2024
1 parent 53a6260 commit 1b692d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/classic-ember-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import browserslistToEsbuild from 'browserslist-to-esbuild';
import { existsSync } from 'fs';
import { join } from 'path';
import { mergeConfig, type UserConfig } from 'vite';
import { pathToFileURL } from 'url';

export function classicEmberSupport() {
return [
Expand All @@ -20,7 +21,7 @@ export function classicEmberSupport() {
async config(userConfig: UserConfig) {
const targetsPath = join(process.cwd(), 'config/targets.js');
if (existsSync(targetsPath)) {
const targets = await import(targetsPath);
const targets = await import(pathToFileURL(targetsPath).toString());
if (targets.default.browsers) {
return mergeConfig(
{
Expand Down

0 comments on commit 1b692d8

Please sign in to comment.