Ask questionsuse storybook with vue and vue-i18n
my component combines with vue-i18n. I try to add like this:
import Vue from 'vue' import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
but it still can't work in storybook. How to use it ?
Answer
questions
alexander-elgin
If you use Vue CLI plugin for storybook you can modify the config/storybook/config.js
as follows
import { addDecorator } from '@storybook/vue';
import i18n from '@/plugins/i18n';
addDecorator(() => ({
template: '<story/>',
i18n,
}));