build: createRequire

This commit is contained in:
Acid Chicken (硫酸鶏) 2024-02-14 16:13:15 +09:00
parent af02672c6a
commit 4c13eaac38
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
1 changed files with 2 additions and 0 deletions

View File

@ -3,12 +3,14 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { createRequire } from 'node:module';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import type { StorybookConfig } from '@storybook/vue3-vite';
import { type Plugin, mergeConfig } from 'vite';
import turbosnap from 'vite-plugin-turbosnap';
const require = createRequire(import.meta.url);
const _dirname = fileURLToPath(new URL('.', import.meta.url));
const config = {