This repository has been archived by the owner on Dec 1, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Importing Vue components with Rollup #19
Labels
Comments
EtienneSchmitz
added a commit
to EtienneSchmitz/vue-cli-plugin-p11n
that referenced
this issue
Mar 27, 2019
In build mode, it is impossible to create components plugins because the import of vue files provokes errors. By adding rollup-plugin-vue in the configuration of rollup, we can solve the problem. See kazupon#19
Hello. Same problem with my programm. I suggest a PR. Cheers ! |
kazupon
pushed a commit
that referenced
this issue
Mar 28, 2019
…@EtienneSchmitz * 🐛 bug(core) : Correct the bug which prevents to use vue files. In build mode, it is impossible to create components plugins because the import of vue files provokes errors. By adding rollup-plugin-vue in the configuration of rollup, we can solve the problem. See #19 * lint(core) : Resolve the problem with linter. Problem with the linter : Extra semicolon semi at 6.
I've released v0.2.1 |
@kazupon Still not working on /*
* NOTE:
* This file is plugin stub for main.js
*/
import Vue from 'vue'
import VueResource from 'vue-resource'
import { ValidationProvider, ValidationObserver, extend, configure } from 'vee-validate';
import * as rules from 'vee-validate/dist/rules';
const config = {
classes: {
valid: '',
invalid: 'is-danger'
}
};
configure(config);
Object.keys(rules).forEach(rule => {
extend(rule, rules[rule]);
});
// Register it globally
Vue.component("validation-observer", ValidationObserver);
Vue.component("validation-provider", ValidationProvider);
import plugin from './index'
Vue.use(VueResource)
Vue.use(plugin)
/*
* NOTE:
* If you want Vue instance of main.js to import something in your plugin as a Vue option,
* you need to export it here.
*/
// export default plugin |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to setup a install a Vue component like so:
However when I try to build (
npm run build
) I get the following output:After reading some of the other issues I think I may need rollup-plugin-vue but I am not entirely sure how to integrate this.
Cheers!
The text was updated successfully, but these errors were encountered: