-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to import the module using Webpack? #125
Comments
The errors you're getting is probably a result of 8080 aka used for http. Try run it with https on 3001 et al. Additionally, |
I have the same issue with fresh created vue3 application on webpack. Did you find a solution @ludvigeriksson ? |
Unfortunately not |
I am also stuck on this using vite with vue when using import { execute} from 'wasm-imagemagick'
when using import * as Magick from 'wasm-imagemagick/dist/magickApi'
I did paste the wasm files in the public directory, but of course I am not sure if it actually gets served(probably not) |
i have gotten this to work by including this script directly in my html
as you can see, it imports the lib from a remote source and then puts it on the window object. it's not ideal, but i also was not successful in any of my attempts to just use the npm module. hope this helps! |
I tried to modify the bundled output Unfortunately it takes a little longer to load the hope this helps |
How do I import the module for use with a webpack dev server? Where do I put the
magick.wasm
andmagick.js
files? I'm using preact and start the dev server withpreact watch
. Can I editwebpack.config.js
to include the files somehow?edit: I've tried using
copy-webpack-plugin
, which seems to work if I build the project, but in the development server I get errors:The text was updated successfully, but these errors were encountered: