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
When using esbuild and adding the following entry to plugins:
optimizeLocales.esbuild({locales: ['en-US'],})
I get the following error:
X [ERROR] Do not know how to load path: locales-plugin:E:\dev\project\node_modules\@react-aria\optimize-locales-plugin/empty.js
node_modules/react-aria-components/dist/intlStrings.mjs:1:32:
1 │ import $bK1z9$arAEmodulejs from "./ar-AE.mjs";
╵ ~~~~~~~~~~~~~
Provide a general summary of the issue here
When using
esbuild
and adding the following entry to plugins:I get the following error:
This is due to this line:
react-spectrum/packages/dev/optimize-locales-plugin/LocalesPlugin.js
Line 27 in e14088a
Windows uses backslashes so if you simply concatenate strings you'll get malformed paths. You need to use the node
path
module.🤔 Expected Behavior?
It should not throw errors.
😯 Current Behavior
It throws an error because the path is malformed.
💁 Possible Solution
Use
path.join
orpath.resolve
.🔦 Context
No response
🖥️ Steps to Reproduce
You just need to run esbuild with the plugin on Windows.
Version
@react-aria/optimize-locales-plugin v1.1.3
What browsers are you seeing the problem on?
Other
If other, please specify.
Node v21.7.1
What operating system are you using?
Windows 11
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: