VueJS shows "development mode" message even with on build in production-mode
When you set the alias vue/dist/vue.js
, you're using a file that's always in development mode. Change your alias to vue/dist/vue.min.js
and you'll be in production mode.
You could set your version of Vue to match your build environment. This example assumes that process.env.NODE_ENV
is set to production
for production builds, so you'd need to make sure that was indeed the case to use this example.
...resolve: { alias: { vue: process.env.NODE_ENV == 'production' ? 'vue/dist/vue.min.js' : 'vue/dist/vue.js' }}
See this Github issue for reference.