Skip to content

One cannot have relative assets #2153

Closed
@elevatebart

Description

@elevatebart

Version

3.0.0-rc.12

Node and OS info

Windows 10 yarn 1.7.0

Steps to reproduce

vue create --default test-app

Then edit vue.config.js and set baseUrl as "_Inc/vue/".
build

What is expected?

The base url of the website is my.company.com/mysite/ where mysite is going to be an instance of the software.
When running the app, I would expect the assets to be called with the same tools as webpack does, relatively.

my.company.com/mysite/_inc/vue/js/chunk-vendors.456123.js

What is actually happening?

Instead the app looks for files at the root route (pun intended).
my.company.com/_inc/vue/js/chunk-vendors.456123.js

Therefore it completely ignores the subroute and sends a 404.


This issue is connected to #900 and has already been commented on. @lsorber & @stofte, thank you for reporting it.

Now that the output.publicPath in webpackConfig is not an option anymore (blocking error in 3.0.0), I have no way around this.
Should I look for another? make a PR ?

Thank you in advance,
Great work on the vue cli

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions