Skip to content

fix(vite): use .mts config files and import.meta.dirname - #8

Merged
jaysoo merged 1 commit into
mainfrom
nxc-4772-mts-configs
Aug 10, 2026
Merged

fix(vite): use .mts config files and import.meta.dirname#8
jaysoo merged 1 commit into
mainfrom
nxc-4772-mts-configs

Conversation

@jaysoo

@jaysoo jaysoo commented Aug 10, 2026

Copy link
Copy Markdown
Member

Current Behavior

Vite 8.2 warns that this workspace's Vite configs use features configLoader: 'native' cannot support: ESM syntax in a CommonJS-loaded .ts config, and __dirname.

Expected Behavior

No warning. .mts keeps the configs ESM regardless of the package.json type, and import.meta.dirname is the ESM equivalent of __dirname.

Related Issue(s)

NXC-4772

Supersedes #7, which could not be reopened after a force-push rewrote its recorded head.

## Current Behavior
Vite 8.2 warns that these configs use features `configLoader: 'native'`
cannot support: ESM syntax in a CommonJS-loaded `.ts` file, and `__dirname`.

## Expected Behavior
No warning. `.mts` keeps configs ESM regardless of package.json `type`, and
`import.meta.dirname` is the ESM equivalent of `__dirname`.

## Related Issue(s)
NXC-4772
@jaysoo jaysoo closed this Aug 10, 2026
@jaysoo jaysoo reopened this Aug 10, 2026
@jaysoo
jaysoo merged commit d4a70de into main Aug 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant