Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 335bfd2

Browse files
committed
fix(build-in.ts): Compatible with next15
1 parent 1a19c89 commit 335bfd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_internal/utils/build-in.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use server';
22

33
import { isServer } from './helper';
4-
export const buildIn = (styleSheet: string, global?: string): void => {
4+
export const buildIn = async (styleSheet: string, global?: string) => {
55
if (!isServer) return;
66

7-
const fs = require('fs');
8-
const path = require('path');
7+
const fs = await import('fs');
8+
const path = await import('path');
99
const styleFilePath = path.join(__dirname, '../../core/styles/style.module.css');
1010
const globalFilePath = path.join(__dirname, '../../core/styles/global.css');
1111
const filePath = global === '--global' ? globalFilePath : styleFilePath;

0 commit comments

Comments
 (0)