-
-
Notifications
You must be signed in to change notification settings - Fork 150
rollup-plugin-vue not working in when bundling in browser #112
Comments
It uses node And again, the |
FYI: I have tried some ways to run
And I used Still trying and will look deeper in that. Thanks. |
Any news on this? |
Just ran into this myself and, let's just say the fix wasn't terribly straightforward. Here's what I found for anyone still running into this: First, I'm assuming you are precompiling your vue components (ie you only want to include the vue runtime in your build), but you're still running into Install @rollup/plugin-alias to alias import replace from '@rollup/plugin-replace';
import alias from '@rollup/plugin-alias';
export default {
// yada yada
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify('production')
}),
alias({
entries: {
'vue': 'vue/dist/vue.runtime.esm.js'
}
}),
resolve(),
vue(),
]
}; Note that if you're using the |
There's also the way of not pulling Vue from npm, but loading it from CDN in I'm not really seeing this as a rollup-plugin-vue issue, though people likely will come to find the solution here. |
@akauppi I am trying the same thing with systemjs, but I am having an error where I also see that I have this same problem both when I try to use a cdn in the browser or try to bundle the vue runtime Why is |
I was able to solve the issue by switching to rollup-plugin-vue2 |
Same here. Apparently the old |
Fucking hell, HOURS wasted. This fixed it for me. If you're getting errors like "x" was not found in 'vue' Try using this. |
does this plugin support in-browser rollup setups?
i can't seem to get it to work (in a client-side setup without node).
in principle, however, rollup supports client-side bundling..
The text was updated successfully, but these errors were encountered: