aspnetcore-Vue-starter
aspnetcore-Vue-starter copied to clipboard
Latest version fails to switch to production
I been using previous versions to this update and switching to production has no problem. However, with the latest build I had last night, I ran into issues where I can't switch to production no matter what I do. It runs all the prod scripts, hides modules, etc. But when I run it, it says:
vue.js:9057 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
client.js:92 [HMR] connected
In the google console.
And when I deploy to IIS, it gives me a server side error:
One or more errors occurred. (Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
I'm not sure why it still thinks I'm on dev no matter what I do.
I even created this bat file:
call xcopy /Y "%~dp0appsettings.Production.json" "%~dp0appsettings.json"
call rmdir /S /Q "%~dp0wwwroot"
call setx ASPNETCORE_ENVIRONMENT "Production" /M
call npm run build
:End
PAUSE
And it ran well. All the scripts executed successfully, but I still get the same errors. If I run other projects that I had based on this repo, I didn't run into these issues.
How are you running your publish script?
Maybe there's something in here that could help make sure it's using the correct json file?
https://github.com/aspnet/AspNetCore/issues/5169
That's strange that Prod builds aren't running correctly in the master branch - nothing for that was changed hmmm