Asked By: Anonymous
The latest (as of writing) version of rollup-plugin-vue is 4.6.2
It has a dependency on vue-runtime-helpers version 1.0.0
This version has an error. When trying to create a bundle with Rollup, it produces the error
Error: ‘default’ is not exported by node_modules/vue-runtime-helpers/dist/normalize-component.js
Prior to this, rollup-plugin-vue version 4.6.1 with vue-runtime-helpers version 0.2.0 works fine.
Solution
Answered By: Anonymous
Found the answer to this in their latest commit, you must also include rollup-plugin-commonjs in your rollup.config.js
:
import vue from 'rollup-plugin-vue';
import commonjs from 'rollup-plugin-commonjs';
export default {
entry: 'index.js',
plugins: [
commonjs(),
vue(),
]
}
This should stop the error from occurring.