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
I am using vite in react.js and in my async function I am trying to dynamically import the package.
async function formatCode(code){const{ format } = await import("prettier/standalone");const plugin = await import("prettier-plugin-rust");return await format(code,{
parser:"rust",
tabWidth:2,
plugins:[plugin],// used plugins: plugin and the error is same});}
Output Error
error
Couldn't resolve parser "rust". Plugins must be explicitly added to the standalone bundle.
Does this package support this kind of dynamic importing?
The text was updated successfully, but these errors were encountered:
I am using vite in react.js and in my async function I am trying to dynamically import the package.
Output Error
Does this package support this kind of dynamic importing?
The text was updated successfully, but these errors were encountered: