When building an app in ssr mode I've noticed that vee-validate is not included in the build package and app crashes on the server.
To reproduce:
1) > nuxt build
2) delete vee-validate from local node_modules
3) > NODE_ENV=production node server/index.js
4) observe server error: Cannot find module 'vee-validate'
Versions:
nuxt v2.4.2
vee-validate v2.1.7
I have the following config:
nuxt.config.js:
plugins: [
{ src: '@/plugins/registerPlugins.js' }
],
registerPlugins.js:
import Vue from 'vue'
import VeeValidate from 'vee-validate'
Vue.use(VeeValidate, { inject: false })
I tried to configure nuxt.config so that 'vee-validate' would be force-packed but I haven't find a way.
I also tried to import vee-validate directly to a page component - same result.
Any ideas how to solve this problem?
Or at least how to tell webpack (via nuxt.config) to include vee-validate module?