-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Loading ruffle builds through webpack #3952
Comments
Figured it out, i need to setup the config BEFORE loading ruffle. However it's still strange that Another thing is that loading ruffle through webpack doesn't seem to be possible right now at all. No matter what I do I can't seem to be able to make webpack just generate url for wasm to make a publicPath out of it. It gets very complicated very quick. Would be nice to have a separate builds for |
The demo page [1] is generated with webpack and uses [1] https://github.com/ruffle-rs/ruffle/blob/master/web/packages/demo/www/index.js |
I tried looking at it, but as far as I understand, As far as I can see, there are three ways of using Ruffle in a somewhat complex project (i.e. vue/react website/app):
|
The dream developer UX would be:
import RufflePlayer from 'ruffle-whatever-binary';
// ...
const ruffle = RufflePlayer.newest()
// ... mount to a component etc |
As of #16928, We aren't yet publishing the module on npm though - that will come shortly. |
Describe the bug
I'm trying to use ruffle with webpack to add flash support in a vue-based website.
What i do is this:
This however doesn't work, as Ruffle seems to completely ignore
publicPath
and still tries to load the wasm from current path. No matter if i try to set publicPath onruffle
orplayer
the outcome is same - it tries to fetch from./
and gets 404.Expected behavior
Everything works just like when putting ruffle build in a source tree (into static dir), publicPath setting works
Is the problem with the Ruffle desktop app, extension, or self-hosted version?
self-hosted version (through npm and ruffle-mirror https://github.com/rwv/ruffle-mirror)
What platform are you using?
Webpack 4.44
Firefox 81 Linux x64
The text was updated successfully, but these errors were encountered: