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
Note: This particular project targets 'esnext' everywhere, I understand that's a moving target. If I just need to update configuration to achieve the expected output, that sounds good to me! Thanks for any insights.
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 vuejs/core instead.
Probably older rollup was ignoring this config and outputting with, but it was fixed to respect the config rollup/rollup#5814 You need to manually configure output.importAttributesKey from now on.
(Maybe the default should be changed, but I think this is an upstream issue, so let me close this for now.)
Describe the bug
Looking at the compiled output, it looks like 6.1.x reverted back to the old keyword
assert
for dynamic imports instead ofwith
-- is this expected?6.1.x
6.0.1
The compiled CJS code like the above started emitting errors for me in
6.1.0
,6.1.1
.Downgrading to
6.0.11
, the error seems to go away.Experimented with build target a bit
esnext
,modules
,node23
,chrome123
None of these transpile to the syntax
{ with: { type: 'json' } }
Checked MDN to make sure
with
is still the thing 😅Checked MDN again to make sure variables are OK to use. Vite Docs give mixed signals about variables in dynamic imports, despite this working prior to upgrading.
Checked esbuild and everything seems good

Note: This particular project targets 'esnext' everywhere, I understand that's a moving target. If I just need to update configuration to achieve the expected output, that sounds good to me! Thanks for any insights.
Reproduction
https://github.com/johnnybenson/vite-await-import-with-type-json-bug
Steps to reproduce
Steps
Source
Build
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: