Open 7iomka opened 3 years ago
me too
me too
Has this problem not been solved yet?
The cause is:
path.join('http://localhost:8080/cdn/','js/safari-nomodule-fix.js') // http:/localhost:8080/cdn/js/safari-nomodule-fix.js
the result lost a '/'
lol) looks like the project has been abandoned if such a critical issue is not fixed
configureWebpack: (config) => {
const SafariNomoduleFixPlugin = config.plugins.find(
(plugin) => plugin?.constructor?.name === 'SafariNomoduleFixPlugin'
);
if (SafariNomoduleFixPlugin) {
SafariNomoduleFixPlugin.unsafeInline = true;
}
}
In my project, I use https://github.com/vuejs/vue-cli/pull/7247 to solve this issue.
+1
vue.config.js:
{
publicPath: '//mydomain.com/xxx/',
}
output:
<script src="/mydomain.com/xxx/js/safari-nomodule-fix.js" type="module"></script>
expect:
<script src="//mydomain.com/xxx/js/safari-nomodule-fix.js" type="module"></script>
seem #7247 can resolve this issue?
Version
5.0.0-beta.2
Environment info
Steps to reproduce
What is expected?
Script publicPath is the same and is correct
What is actually happening?
Script publicPath is wrong, 2nd slash after http is omitted
Why? How to pass absolute url for production? (I have all static files hosted on CDN on another domain)