Skip to content

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

Draft
jaysoo wants to merge 1 commit into
mainfrom
nxc-4772-mts-configs
Draft

fix(vite): use .mts config files and import.meta.dirname#7
jaysoo wants to merge 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
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