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

Commit f3139f3

Browse files
committed
fix(build-in.ts): removed 'use server' directive
1 parent 5223dc7 commit f3139f3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/_internal/utils/build-in.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
'use server';
2-
3-
import * as fs from 'fs';
4-
import * as path from 'path';
51
import { isServer } from './helper';
62

73
export const buildIn = (styleSheet: string, global?: string): void => {
4+
let fs: typeof import('fs');
5+
let path: typeof import('path');
6+
if (typeof window === 'undefined') {
7+
fs = require('fs');
8+
path = require('path');
9+
} else return;
10+
811
const styleFilePath = path.join(__dirname, '../../core/styles/style.module.css');
912
const globalFilePath = path.join(__dirname, '../../core/styles/global.css');
1013

0 commit comments

Comments
 (0)