We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.0-beta.6
vue-cli/packages/@vue/cli-service/lib/Service.js
Line 210 in edff5b4
module.exports = { baseUrl: 'https://cdn.example.com/assets/' }
npm run build
dist/index.html
The text was updated successfully, but these errors were encountered:
A possible workaround, by also setting publicPath:
// vue.config.js var path = process.env.NODE_ENV === 'production' ? 'https://cdn.example.com/assets/' : '/' module.exports = { configureWebpack: { output: { publicPath: path } }, baseUrl: path }
but also had to set in package.json:
"scripts": { "serve": "vue-cli-service serve --open", "build": "cross-env NODE_ENV=production vue-cli-service build" },
this did not work per docs:
"scripts": { "serve": "vue-cli-service serve --open", "build": "vue-cli-service build --mode production" },
Sorry, something went wrong.
My current workaround, btw, is
let baseUrl = '/'; if (process.env.NODE_ENV === 'production') { baseUrl = '//cdn.example.com/assets/'; } module.exports = { baseUrl }
fix(cli-service): should not add a leading slash to baseUrl when it i…
abb82ab
…s absolute (#1172) fix #1084
Successfully merging a pull request may close this issue.
Version
3.0.0-beta.6
Reproduction link
vue-cli/packages/@vue/cli-service/lib/Service.js
Line 210 in edff5b4
Steps to reproduce
npm run build
dist/index.html
What is expected?
<script type=text/javascript src=https://cdn.example.com/assets/js/app.8cd3ebbc.js></script>What is actually happening?
<script type=text/javascript src=/https://cdn.example.com/assets/js/app.8cd3ebbc.js></script>The text was updated successfully, but these errors were encountered: