Dynamic assets import #550
-
Hello everyone! import os from 'os'
const getBinAsset = async () => {
if (os.platform() == 'win32') {
return await import('../../resources/bin.exe?asset')
} else if (os.platform() == 'linux') {
return await import('../../resources/bin?asset')
} else {
throw new Error('Unsupported platform')
} |
Beta Was this translation helpful? Give feedback.
Answered by
tsmanuelanton
Aug 26, 2024
Replies: 1 comment
-
My bad 😮💨, answer: https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tsmanuelanton
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My bad 😮💨, answer: https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url