-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
Describe the bug
A lot of npm packages support loading different locales on the fly(like dayjs)
But when do import.meta.glob('/node_modules/some-package/locale/*.js
will return empty object
So now I need to move all the locale js outside node_modules, which causes a lot of lining issue
It seems like someone actively disabled it
8b3d0ea
But I don't think it's the intended behaviour, ref: #1985 (comment)
Doc also doesn't specify this behaviour
System Info
System:
OS: macOS 11.2.3
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Memory: 127.06 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
Browsers:
Chrome: 96.0.4664.110
Safari: 14.0.3
npmPackages:
@vitejs/plugin-react: 1.1.3 => 1.1.3
vite: 2.7.10 => 2.7.10
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.