Closed chr15m closed 5 years ago
If I follow the advice in the second error it goes away but I still get the first error ("Can't resolve 'env'").
Just saw this: https://github.com/webpack/webpack/issues/7352
I will follow up with the workaround linked there.
I got webpack to build without errors using the suggested workaround:
"module": {
"rules": [
{
"test": /libtimidity\.wasm$/,
"type": "javascript/auto", // ← !!
"loader": "file-loader",
"options": {
"publicPath": "/"
}
}
]
}
However I couldn't figure out how to use that build. In the end I gave up and just used bg-sound in a script tag and banged a <bg-audio src="...mid">
into the page.
Hopefully in future somebody will get a demo app working with Timidity using Webpack.
Glad you got it working. I'm not sure what the webpack issue is. It works fine in browserify with no config needed.
Yes I don't know why I didn't just try a browserify build instead. Great idea. Will do that for the next iteration. Thanks @feross very much appreciate your work!
Hi @feross - I know you're very busy so hopefully this won't take much of your time.
When I try to do a simple
import * as timidity from "timidity";
and then run that file through webpack I get the following 2 errors:I'm not a heavy webpack user but maybe you have some pointers as to how I can fix this? Will issue a PR if I get it working.