Skip to content

provide baseUrl for development mode #1102

@troy351

Description

@troy351

What problem does this feature solve?

baseUrl in vue.config.js now only works in production mode.
In my case, I need to load the page as an iframe.

something like

<!-- http://localhost/ -->
<body>
<iframe src="http://localhost/myframe/"></iframe>
</body>

But it turns out http://localhost/myframe/ will load app.js from http://localhost/ which is not right.

PS. I need to inject some data into iframe, so it needed to be run in development mode for debugging

What does the proposed API look like?

maybe a devBaseUrl

module.exports = {
  baseUrl: '/myframe/', // this works in production mode
  devBaseUrl: '/myframe/' // this works in development mode
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions