Comments (2)
import.meta.glob
only accepts static glob strings. If you want to use variables, you can index it from the result of import.meta.glob
.
from vite.
import.meta.glob
only accepts static glob strings. If you want to use variables, you can index it from the result ofimport.meta.glob
.import.meta.glob
仅接受静态 glob 字符串。如果要使用变量,可以从import.meta.glob
的结果中对其进行索引。
Although it is a variable, it can directly infer the content from the context. Can we consider compatibility, because it is very likely that we need the file name of the current path to match the corresponding information. Can we process import.meta.url
in advance? Convert it to the corresponding path, then infer the identify in import.meta.glob, and further search for the result of the variable. If it is a constant, take this value.
from vite.
Related Issues (20)
- Declare missing `vite:preloadError`event on Window namespace HOT 1
- Allow setting mode via environment variable
- Vite includes source files into the production bundle out of the box
- Vite version 5 does not work with Apexcharts (But it does work with 4.5.0) HOT 3
- Unused import from external module prints massive indecipherable warning message HOT 4
- Support build multi-page-app to saparate dir HOT 1
- Dev server doesn't update overridden env var when doing an automatic reload. HOT 1
- ERR_HTTP_HEADERS_SENT with 5.3.0 / 5.3.1 and https-proxy-agent configured HOT 5
- vite build creates source folder in dist on certain imports HOT 1
- Http OPTIONS request doesn't work with Server Proxy HOT 3
- Vue3, Router4 problem when using externals
- CSS from entrypoints is not extracted correctly HOT 2
- Dynamic import of a peer dependency causes inconsistencies between dev and prod HOT 2
- Have plan to support MF2?
- Unclear configuration setup for bundling for non-browser environments HOT 7
- HMR won't work on vue files if import other packages which are in the same monorepo HOT 1
- Vite dev doesn't serve index.html from subdirectories of publicDir HOT 1
- RollupError: [type] is not exported by [file] - failure for relative imports of types HOT 2
- The page will automatically refresh after installing the plugin.prompt:optimized dependencies changed. reloading
- How to Resolve Browser Cache Invalidation Issue in Vite-React Project Deployment?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite.