build(#10336): use unpkg for storybook tabler icons
This commit is contained in:
parent
b9289c397b
commit
3f4d93a287
4 changed files with 2 additions and 35 deletions
|
@ -1,7 +1,5 @@
|
|||
import { resolve } from 'node:path';
|
||||
import type { StorybookConfig } from '@storybook/vue3-vite';
|
||||
import { mergeConfig, normalizePath } from 'vite';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
import { mergeConfig } from 'vite';
|
||||
const config = {
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
addons: [
|
||||
|
@ -23,20 +21,6 @@ const config = {
|
|||
},
|
||||
async viteFinal(config, options) {
|
||||
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: {
|
||||
target: [
|
||||
'chrome108',
|
||||
|
|
|
@ -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>
|
||||
window.global = window;
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue