You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(commonjs)!: Correctly infer module name for any separator (#924)
* test(commonjs): Add test for different path separators
Add test for module IDs that use a path separator that is different from
`path.sep`.
Previously, when a module whose file name is `index.js` was resolved to
a module ID containing different path separators, the commonjs plugin
generated a variable name containing the module's absolute path.
* fix(commonjs)!: Correctly infer module name for any separator
BREAKING CHANGES:
Correctly infer the module name from the module ID, regardless of the
path separator used in the module ID and the value of `path.sep`.
This generates variable names like `react` instead of
`C__testViteApp_node_modules_react` when a module ID of
`C:/test-vite-app/node_modules/react/index.js` is given on Windows.
0 commit comments