provide baseUrl for development mode
See original GitHub issueWhat 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
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Nuxt How to set baseURL in dev or production - Stack Overflow
This is the way to do it through the nuxt.config.js : let development = process.env.NODE_ENV !== 'production' module.exports = { axios: ...
Read more >Set HTTP Base URLs of Production and Development ...
In this lesson you can learn how to set http base url for production and development environment in angular 6 or angular 7....
Read more >How to handle environment-specific settings in your ...
Simple. Just host the app and API from the same webserver, so relative URLs work everywhere. This avoids both the base URL issue...
Read more >Configuration Reference | Vue CLI
Vue CLI is in Maintenance Mode! For new projects, it is now recommended to use create-vue to scaffold Vite-based projects.
Read more >Set up a Development URL (with TypeScript) - App development
By providing a Development URL, you can make changes to an extension and see the results of those changes by ... const libUrl...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@duduluu you may misunderstood my question. the problem is that embed spa getting its
app.js
from main spa for there is a/
before it. So the embed spa won’t render correctly.The main spa finding embed spa thing works fine with nginx
Not sure your frame is a static page or vue app.
If it’s a static page, you could set dev server in vue.config.js like this:
If vue app, set the base for vue router in router.js, Vue router documents base