Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Установка и использование сторонних плагинов #4

Open
astrahov opened this issue Apr 26, 2019 · 2 comments

Comments

@astrahov
Copy link
Contributor

Я установил плагин BootstrapVue

npm install bootstrap-vue bootstrap.

Следующий код не работает:

import {Vue} from 'ui.vue';
import BootstrapVue from 'bootstrap-vue';

Vue.use(BootstrapVue)

Vue.create({
...
});

И во Vue-компоненте (*.vue) выдает ошибку при размещении компонента

<b-button>Button</b-button>

Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Как правильно подключить плагин и разместить компоненты этого плагина в своих компонентах Vue (*.vue)?

@vovkabelov
Copy link
Member

@astrahov, попробуйте в bundle.config.js указать

plugins: {
	resolve: true,
},

@astrahov
Copy link
Contributor Author

@vovkabelov, сделал так и теперь после команды bitrix build зависает IDE и ничего не происходит.

const vuePlugin = require('rollup-plugin-vue');
const commonjs  = require('rollup-plugin-commonjs');

module.exports = {
    ...
    plugins: {
        custom: [
            commonjs(),
            vuePlugin(),
        ],
        resolve: true,
    },
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants