I'm using Webpack.
I loosely followed this tutorial to configure Vuejs into my build: https://medium.com/js-dojo/how-to-configure-webpack-4-with-vuejs-a-complete-guide-209e943c4772
I was able to get it to work, but when I tried to render a template, I got an error (in the browser): "You are using the runtime-only build of Vue where the template compiler is not available.".
The actual Vuejs installation under node_modules
has several variations, including the full package with the compiler, which is what I want.
However, Webpack decides to include the runtime version.
I dag some more, and found that if I modify node_modules/vue/package.json
, and change its main
key from dist/vue.runtime.common.js
to dist/vue.common.js
and its module
key from dist/vue.runtime.esm.js
to dist/vue.esm.js
- Webpack DOES pick the full version.
I am looking for a way to get this effect without changing Vue's own package.json. I found this: How do I override nested NPM dependency versions? , and tried the accepted answer, but it didn't seem to have any effect.
Can anyone tell me the "right way" to achieve my goal, i.e. to have Webpack include the full version of Vuejs, instead of just the runtime?