Skip to content

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

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#1
jaysoo merged 1 commit into
mainfrom
nxc-4772-mts-configs

Conversation

@jaysoo

@jaysoo jaysoo commented Aug 7, 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

## 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 force-pushed the nxc-4772-mts-configs branch from 8c3738a to 26a7827 Compare August 10, 2026 14:15
@jaysoo
jaysoo marked this pull request as ready for review August 10, 2026 16:45
@jaysoo
jaysoo merged commit 49c393a into main Aug 10, 2026
1 check 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