import.meta.resolve
support
#14405
sapphi-red
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Creating a place to put some thoughts.
I guess it'd be better to create a plugin first like we did with
import.meta.glob
(vite-plugin-glob)Runtime Supports
import.meta.resolveSync
that is sync Implement synchronousimport.meta.resolve(…)
oven-sh/bun#2472baseURL
argumentRelated exsiting features
import foo from './foo.png'
/import foo from './foo?url'
new URL('./foo', import.meta.url)
related: #13142
related: #14169 (comment), #7837
new Worker(new URL('./worker.js', import.meta.url))
Things that needs to be considered
import.meta.resolve(`highlight.js/lib/languages/${lang}`)
import.meta.resolve(`./foo/${condition ? 'bar' : 'baz'}.js`)
(related: fix(assetImportMetaUrl): allow ternary operator in template literal urls #13121)baseURL
argument be supported?importmaps
? (browsers/deno uses it to resolve the value)import.meta.resolve(…)
parcel-bundler/parcel#8924 (comment)References
import.meta.resolve
whatwg/html#8077import.meta.resolve(…)
parcel-bundler/parcel#8924import.meta.resolve(...)
evanw/esbuild#2866Beta Was this translation helpful? Give feedback.
All reactions