Skip to content

Commit 46eb68d

Browse files
committed
fix
1 parent d19f3b7 commit 46eb68d

File tree

1 file changed

+9
-2
lines changed
  • packages/tailwindcss-language-service/scripts

1 file changed

+9
-2
lines changed

packages/tailwindcss-language-service/scripts/build.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { spawnSync } from 'node:child_process'
33
import esbuild from 'esbuild'
44
import minimist from 'minimist'
55
import { nodeExternalsPlugin } from 'esbuild-node-externals'
6+
import { fileURLToPath } from 'node:url'
67

7-
const __dirname = new URL('.', import.meta.url).pathname
8+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
89

910
const args = minimist(process.argv.slice(2), {
1011
boolean: ['watch', 'minify'],
@@ -30,7 +31,13 @@ let build = await esbuild.context({
3031
// Call the tsc command to generate the types
3132
spawnSync(
3233
'tsc',
33-
['-p', path.resolve(__dirname, './tsconfig.build.json'), '--emitDeclarationOnly', '--outDir', path.resolve(__dirname, '../dist')],
34+
[
35+
'-p',
36+
path.resolve(__dirname, './tsconfig.build.json'),
37+
'--emitDeclarationOnly',
38+
'--outDir',
39+
path.resolve(__dirname, '../dist'),
40+
],
3441
{
3542
stdio: 'inherit',
3643
},

0 commit comments

Comments
 (0)