1
0
forked from mirror/misskey

build(#10336): use unpkg for storybook tabler icons

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-04-01 22:49:50 +09:00
parent b9289c397b
commit 3f4d93a287
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
4 changed files with 2 additions and 35 deletions

View File

@ -1,7 +1,5 @@
import { resolve } from 'node:path';
import type { StorybookConfig } from '@storybook/vue3-vite'; import type { StorybookConfig } from '@storybook/vue3-vite';
import { mergeConfig, normalizePath } from 'vite'; import { mergeConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
const config = { const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [ addons: [
@ -23,20 +21,6 @@ const config = {
}, },
async viteFinal(config, options) { async viteFinal(config, options) {
return mergeConfig(config, { return mergeConfig(config, {
plugins: [
viteStaticCopy({
targets: [
{
src: normalizePath(resolve(__dirname, '../node_modules/@tabler/icons-webfont/*.css')),
dest: 'node_modules/@tabler/icons-webfont',
},
{
src: normalizePath(resolve(__dirname, '../node_modules/@tabler/icons-webfont/fonts/*.{eot,ttf,woff,woff2}')),
dest: 'node_modules/@tabler/icons-webfont/fonts',
},
],
}),
],
build: { build: {
target: [ target: [
'chrome108', 'chrome108',

View File

@ -1,4 +1,4 @@
<link rel="stylesheet" href="./node_modules/@tabler/icons-webfont/tabler-icons.min.css"> <link rel="stylesheet" href="https://unpkg.com/@tabler/icons-webfont@2.12.0/tabler-icons.min.css">
<script> <script>
window.global = window; window.global = window;
</script> </script>

View File

@ -130,7 +130,6 @@
"storybook": "7.0.0-rc.10", "storybook": "7.0.0-rc.10",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme", "storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly", "summaly": "github:misskey-dev/summaly",
"vite-plugin-static-copy": "^0.13.1",
"vitest": "^0.29.8", "vitest": "^0.29.8",
"vitest-fetch-mock": "^0.2.2", "vitest-fetch-mock": "^0.2.2",
"vue-eslint-parser": "9.1.0", "vue-eslint-parser": "9.1.0",

16
pnpm-lock.yaml generated
View File

@ -934,9 +934,6 @@ importers:
summaly: summaly:
specifier: github:misskey-dev/summaly specifier: github:misskey-dev/summaly
version: github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992 version: github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992
vite-plugin-static-copy:
specifier: ^0.13.1
version: 0.13.1(vite@4.2.1)
vitest: vitest:
specifier: ^0.29.8 specifier: ^0.29.8
version: 0.29.8(happy-dom@8.9.0)(sass@1.60.0) version: 0.29.8(happy-dom@8.9.0)(sass@1.60.0)
@ -19784,19 +19781,6 @@ packages:
- terser - terser
dev: true dev: true
/vite-plugin-static-copy@0.13.1(vite@4.2.1):
resolution: {integrity: sha512-KwIcGBT1aOxSq+laK3VmSngoEa3HXWj/6ZEXdv+y59eZ7p/XSuPahoDo+CfYW22JjTdnstgeKWiX+78KNgDu6g==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
vite: ^3.0.0 || ^4.0.0
dependencies:
chokidar: 3.5.3
fast-glob: 3.2.12
fs-extra: 11.1.0
picocolors: 1.0.0
vite: 4.2.1(@types/node@18.15.11)(sass@1.60.0)
dev: true
/vite@4.2.1(@types/node@18.15.11)(sass@1.60.0): /vite@4.2.1(@types/node@18.15.11)(sass@1.60.0):
resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==} resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}