Silence-dream / Silence-dream.github.io

blog博客
https://silence-dream.github.io
3 stars 0 forks source link

Safari-module 协议缺少斜杠 #7

Open Silence-dream opened 1 year ago

Silence-dream commented 1 year ago

修复方法

vue.config.js


module.exports = defineConfig({
  configureWebpack: (config) => {
    const SafariNomoduleFixPlugin = config.plugins.find(
      (plugin) => plugin?.constructor?.name === "SafariNomoduleFixPlugin"
    );
    if (SafariNomoduleFixPlugin) {
      SafariNomoduleFixPlugin.unsafeInline = true;
    }
  },
})

Wrong url for safari-nomodule-fix if publicPath is absolute url (V5) · Issue #6594 · vuejs/vue-cli · GitHub

fix(SafariNomoduleFixPlugin):to solve the publicPath with the protocol missing a "/" character by yilihjy · Pull Request #7247 · vuejs/vue-cli · GitHub