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'm trying to use the new Blazor Javascript isolation feature. I'm importing my own JS file as per the example ExampleJsInterop.cs. It works until I try to import an NPM module from within my script. In my package.json I have set up a dependency on interactjs, and in my script I have added import interact from 'interactjs'; at the top.
I'm getting a Failed to resolve module specifier "interactjs" error. I'm not sure how to get past that.
In the past I have used Webpack to bundle my script and dependencies together into a single file that is added into my index.html as a <script> tag. This was working fine, but I'm not sure how to continue using NPM packages with JS isolation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use the new Blazor Javascript isolation feature. I'm importing my own JS file as per the example
ExampleJsInterop.cs
. It works until I try to import an NPM module from within my script. In my package.json I have set up a dependency oninteractjs
, and in my script I have addedimport interact from 'interactjs';
at the top.I'm getting a
Failed to resolve module specifier "interactjs"
error. I'm not sure how to get past that.In the past I have used Webpack to bundle my script and dependencies together into a single file that is added into my index.html as a <script> tag. This was working fine, but I'm not sure how to continue using NPM packages with JS isolation.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions