Npm run dev runs locally, maps a path and is packaged and released via nginx! What on earth should we do?

I want to start a service locally instead of npm run bulid packaging

I know I can npm run build package and publish
, but I want to know if I can npm run dev and map a domain name [dev.baidu.com]
and do it!

npm run dev and mapping domain name are fine, but the app.js of the page that opens will be 404

bVJ2a0?w=688&h=202

who can tell me if I can play like this? If you play like this, how do you modify the configuration?

May.27,2021

Yes, just change the publicPath of webpack to dev.baidu.com, but make sure your app.js is accessible. Try

http://dev.baidu.com/app.js

Menu