-
Notifications
You must be signed in to change notification settings - Fork 1.2k
webpack issue with canvas #942
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
Comments
I solved this by using node-loader: https://webpack.js.org/loaders/node-loader/
|
@wylde3161 are you trying to create a bundle that will use the browser Canvas? In that case, good news, that should be supported in the 2.x alphas! Could you please try with that one? 😄 |
Per above ... this is fixed in 2.x! |
webpack-node-externals solves this nicely. Install as a dev dependency and then at a suitable point in your webpack config:
|
did a project in NodeJS, when i pack it using webpack some issues arose and the end result is that the canvas object is not defined and emits an error.
webpack.config.js
index.html
Your Environment
The text was updated successfully, but these errors were encountered: