Add Ruffle support for Flash files.
Allow viewing Flash posts with the Ruffle emulator. Known issues: * Many flash files aren't fully supported. * In development it sometimes spazzes out and starts triggering random keyboard shortcuts when you press any key. This doesn't happen with the browser extension. * We have to put the .wasm file in the public/packs/js directory because Ruffle is hardcoded to search for it there. * If you're running Nginx, you need to make sure you're serving the right MIME type for .wasm files or it won't work. * We're using Some Random Guy's unofficial NPM package for Ruffle, since the Ruffle project doesn't publish an official package themselves. We should build our own package. References: * https://github.com/ruffle-rs/ruffle * https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-webassembly-mime-type * https://www.npmjs.com/package/ruffle-mirror
This commit is contained in:
@@ -20,6 +20,12 @@ module.exports = merge(webpackConfig, {
|
||||
options: {
|
||||
runner: "bin/rails runner"
|
||||
}
|
||||
}, {
|
||||
test: /\.wasm$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'js/[name][ext]'
|
||||
}
|
||||
}]
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user