Skip to content

Commit

Permalink
fix: Use sync directly under glob
Browse files Browse the repository at this point in the history
  • Loading branch information
HydenLiu committed Apr 29, 2024
1 parent a29e9e5 commit 9f04082
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions scripts/build/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path';

import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import * as glob from 'glob';
import { sync } from 'glob';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';

Expand All @@ -11,12 +11,10 @@ import { STYLED_PLACEHOLDER } from '../config';
import { compileStyledComponentsPlugin } from '../plugins/compileStyledComponentsPlugin';

const entry = Object.fromEntries(
glob
.sync('src/**/*.{ts,tsx}')
.map((file) => [
path.relative('src', file.slice(0, file.length - path.extname(file).length)),
file,
])
sync('src/**/*.{ts,tsx}').map((file) => [
path.relative('src', file.slice(0, file.length - path.extname(file).length)),
file,
])
);

// eslint-disable-next-line
Expand Down

0 comments on commit 9f04082

Please sign in to comment.