Skip to content
New issue

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

Why use ensureSlash to force slash in front? #3338

Closed
csvwolf opened this issue Jan 21, 2019 · 3 comments · Fixed by #4816
Closed

Why use ensureSlash to force slash in front? #3338

csvwolf opened this issue Jan 21, 2019 · 3 comments · Fixed by #4816

Comments

@csvwolf
Copy link

csvwolf commented Jan 21, 2019

What problem does this feature solve?

We set publicPath in the vue.config.js. But it will add a slash in the front when there is no https?:. In our usage, we will use a publishing tools to handle some STRING LIKE __CDN__. In webpack we only need to set publicPath to __CDN__/, but now we should set as ./__CDN__/.

I don't think the cli should check and auto change personal publicPath settings.

What does the proposed API look like?

For compatibility, maybe add an option like forceSlash to switch the feature is better.

@LinusBorg
Copy link
Member

Really ugly

Uglyness is an expression of personal taste, so not really a criteria by which to judge this.

Do you have any real, tangible, technical problem resulting from this?

@jkzing
Copy link
Member

jkzing commented Jan 23, 2019

Because webpack publicPath do that, https://webpack.js.org/configuration/output/#output-publicpath.

Edit: Just realize that OP is asking the leading slash not trailing slash...

@csvwolf
Copy link
Author

csvwolf commented Jan 27, 2019

Really ugly

Uglyness is an expression of personal taste, so not really a criteria by which to judge this.

Do you have any real, tangible, technical problem resulting from this?

Sorry for my poor English. My idea is to make a switch to control for user who don't need the auto-added leading slash, since there is a special scene or maybe the scene is just common in many companies?

haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Nov 8, 2019
fixes vuejs#3338
fixes vuejs#4184

Actually I don't know why the slash was added in the first place, seems
extraneous to me.
haoqunjiang added a commit that referenced this issue Nov 9, 2019
fixes #3338
fixes #4184

Actually I don't know why the slash was added in the first place, seems
extraneous to me.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants