Skip to content

Wrong url for safari-nomodule-fix if publicPath is absolute url (V5) #6594

@7iomka

Description

@7iomka

Version

5.0.0-beta.2

Environment info

 System: OS: macOS 10.15.7 CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz Binaries: Node: 12.16.3 - /usr/local/bin/node Yarn: 1.17.3 - ~/.npm-global/bin/yarn npm: 6.14.8 - ~/.npm-global/bin/npm Browsers: Chrome: 92.0.4515.93 Edge: Not Found Firefox: 90.0 Safari: 14.1 npmPackages: @vue/babel-helper-vue-jsx-merge-props: 1.2.1 @vue/babel-helper-vue-transform-on: 1.0.2 @vue/babel-plugin-jsx: 1.0.6 @vue/babel-plugin-transform-vue-jsx: 1.2.1 @vue/babel-preset-app: 5.0.0-beta.2 @vue/babel-preset-jsx: 1.2.4 @vue/babel-sugar-composition-api-inject-h: 1.2.1 @vue/babel-sugar-composition-api-render-instance: 1.2.4 @vue/babel-sugar-functional-vue: 1.2.2 @vue/babel-sugar-inject-h: 1.2.2 @vue/babel-sugar-v-model: 1.2.3 @vue/babel-sugar-v-on: 1.2.3 @vue/cli-overlay: 5.0.0-beta.2 @vue/cli-plugin-babel: ~5.0.0-beta.2 => 5.0.0-beta.2 @vue/cli-plugin-eslint: ^5.0.0-beta.2 => 5.0.0-beta.2 @vue/cli-plugin-router: ^5.0.0-beta.2 => 5.0.0-beta.2 @vue/cli-plugin-vuex: ^5.0.0-beta.2 => 5.0.0-beta.2 @vue/cli-service: ~5.0.0-beta.2 => 5.0.0-beta.2 @vue/cli-shared-utils: 5.0.0-beta.2 @vue/compiler-core: 3.1.5 @vue/compiler-dom: 3.1.5 @vue/compiler-sfc: 3.1.5 @vue/compiler-ssr: 3.1.5 @vue/component-compiler-utils: 3.2.2 @vue/eslint-config-prettier: ^6.0.0 => 6.0.0 @vue/shared: 3.1.5 @vue/web-component-wrapper: 1.3.0 eslint-plugin-vue: ^7.14.0 => 7.14.0 vue: ^2.6.11 => 2.6.14 vue-cli-plugin-style-resources-loader: ~0.1.5 => 0.1.5 vue-eslint-parser: 7.9.0 vue-gettext: ^2.1.12 => 2.1.12 vue-hot-reload-api: 2.3.4 vue-loader: 16.3.1 (15.9.7) vue-router: ^3.2.0 => 3.5.2 vue-style-loader: 4.1.3 vue-template-compiler: ^2.6.14 => 2.6.14 vue-template-es2015-compiler: 1.9.1 vuex: ^3.4.0 => 3.6.2 npmGlobalPackages: @vue/cli: Not Found 

Steps to reproduce

publicPath: process.env.NODE_ENV === 'production' ? 'http://localhost:8000/static/frontend' : '/static/frontend', 

What is expected?

Script publicPath is the same and is correct

<script src="http://localhost:8000/static/frontend/js/safari-nomodule-fix.js" type="module"></script> 

What is actually happening?

Script publicPath is wrong, 2nd slash after http is omitted

<script src="http:/localhost:8000/static/frontend/js/safari-nomodule-fix.js" type="module"></script> 

Why?
How to pass absolute url for production? (I have all static files hosted on CDN on another domain)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions