build(#10336): full reload server on change

This commit is contained in:
Acid Chicken (硫酸鶏)
2023-03-25 11:34:17 +09:00
parent 8332c03bd8
commit 2bce064ada
3 changed files with 47 additions and 29 deletions

View File

@@ -1,6 +1,7 @@
import { resolve } from 'node:path';
import type { StorybookConfig } from '@storybook/vue3-vite';
import { mergeConfig } from 'vite';
import restart from 'vite-plugin-restart';
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
@@ -22,6 +23,11 @@ const config = {
},
async viteFinal(config, options) {
return mergeConfig(config, {
plugins: [
restart({
restart: ['../src/**/*', './**/*'],
}),
],
assetsInclude: [resolve(__dirname, '../node_modules/@tabler/icons-webfont/**/*.{css,eot,ttf,woff,woff2}')],
});
},

View File

@@ -123,6 +123,7 @@
"storybook": "7.0.0-rc.6",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly",
"vite-plugin-restart": "^0.3.1",
"vitest": "^0.29.2",
"vitest-fetch-mock": "^0.2.2",
"vue-eslint-parser": "9.1.0",