-
Notifications
You must be signed in to change notification settings - Fork 126
Does not work with Vue.js #75
Comments
That instructions does not work either. |
@victorwpbastos Why do you need |
With vue does not work. |
I did try a lot, without success. |
What exactly doesn't work without those plugins? |
Vue uses |
Okay. plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify('production') // or 'development'
})
] This will let rollup remove constantly false conditions for prodution.
|
To use import { set } from 'vue'
set(object, key, value) So far, so good. But then I end with a problem at runtime from Vuex:
Yeah, I could just remove it from the import Vue from 'vue'
Vue.set(object, key, value) And all works fine, but I want to know why. |
This works for me: import json from 'rollup-plugin-json';
import vue from 'rollup-plugin-vue';
import buble from 'rollup-plugin-buble';
import resolve from 'rollup-plugin-node-resolve';
import includePaths from 'rollup-plugin-includepaths';
let includePathOptions = {
include: {
'vue': 'node_modules/vue/dist/vue.common.js',
'vue-router': 'node_modules/vue-router/dist/vue-router.js'
},
external: ['vue', 'vue-router']
};
export default {
format: 'iife',
entry: 'src/index.js',
dest: 'app/app.js',
globals: {
'vue': 'Vue',
'vue-router': 'VueRouter'
},
plugins: [
json(),
vue(),
includePaths(includePathOptions),
resolve({
browser: true,
main: true
}),
buble()
]
} |
main.js:
rollup.config.js:
error:
![image](https://cloud.githubusercontent.com/assets/1017515/16203163/44a20a92-36ef-11e6-875e-9212e76ddf71.png)
The text was updated successfully, but these errors were encountered: