3.0.0-rc.10
8.11.2
The following text is translated from Chinese into English through Google Translate. If there is any inaccuracy, please forgive me.
https://github.com/mqhe2007/vue-remote-module
Run the project in the github repository above.
Keep the existing values or modify the value of the "baseUrl" configuration in "vue.config.js".
Run "yarn build" to package.
Open the "dist/clkm.umd.js" file and find the "__webpack_require__.p" variable.
check the value of "__webpack_require__.p"
The value of "__webpack_require__.p" should be equal to the value of the "baseUrl" configuration.
The value of "__webpack_require__.p" is an empty string regardless of the value set in the "baseUrl" configuration.
It doesn't make sense to have a fixed baseUrl in a library. In library mode it is configured to dynamically determine public path based on the URL from which the main js file is loaded from: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/commands/build/setPublicPath.js
Thank you, this operation is cool! Meet the needs of remote static resource references.
It doesn't make sense to have a fixed
baseUrlin a library. In library mode it is configured to dynamically determine public path based on the URL from which the main js file is loaded from: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/commands/build/setPublicPath.js
window.document.currentScript does not work in IE11.
@wordythebyrd Use this polyfill: https://github.com/amiller-gh/currentScript-polyfill
It doesn't make sense to have a fixed
baseUrlin a library. In library mode it is configured to dynamically determine public path based on the URL from which the main js file is loaded from: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/commands/build/setPublicPath.js
If the library is a plugin installed with NPM and the plugin uses the lazy loading, webpack does not find the other pieces. :(