Support __webpack_public_path__ #7
Comments
🙏 Thank you! |
I'm currently running into an issue with this here: nteract/nteract#2992
|
We dynamically set the |
Confirmed the problem. It incorrectly refers to |
Could you provide an example of how you're going about setting the I end up with files in the correct location but instead of webpack looking for files in the correct public path, it looks for them a domain.com/js/worker.js when in reality it is domain.com/multi-site-name/default/some-version-hash/js/worker.js. We need this plugin to respect the runtime setting of |
We wanted to provide an app which is loadable from any path, so therefore we dynamically determine the base path on runtime and use it as So therefore we also had the problem loading the window.MonacoEnvironment = {
getWorkerUrl(moduleId, label) {
return `${BASE_PATH}${label == 'javascript' ? 'typescript' : 'editor'}.worker.js`;
}
}; If you want to provide more languages then you have to consider more workers (see issue). I hope this helps some people. |
We've made good use of this plugin in nteract/nteract#2779. We're running into one major issue though -- when we host our app on a subpath it appears that Monaco's webworkers aren't loading based on the
__webpack_public_path__
, instead relying only on the staticpublicPath
in the webpack config.What would we need to do to make monaco recognize the dynamic public path?
cc @yuvipanda
The text was updated successfully, but these errors were encountered: