@@ -3,7 +3,6 @@ import { existsSync as fsExistsSync } from "node:fs";
3
3
import { mkdir as fsMkdir , readdir as fsReaddir , readFile as fsReadFile , rm as fsRm , writeFile as fsWriteFile } from "node:fs/promises" ;
4
4
import { dirname as pathDirname , join as pathJoin } from "node:path" ;
5
5
import { fileURLToPath } from "node:url" ;
6
- import ncc from "@vercel/ncc" ;
7
6
const root = pathDirname ( fileURLToPath ( import . meta. url ) ) ;
8
7
const packageFileName = "package.json" ;
9
8
const scriptEntryPointFileName = "main.js" ;
@@ -41,22 +40,9 @@ if (fsExistsSync(outputDirectoryPath)) {
41
40
42
41
/* Create bundle. */
43
42
console . log ( execSync ( `"${ pathJoin ( root , "node_modules" , ".bin" , process . platform === "win32" ? "tsc.cmd" : "tsc" ) } " -p "${ pathJoin ( root , "tsconfig.json" ) } "` ) . toString ( "utf8" ) ) ;
44
- let { code } = await ncc ( inputFilePath , {
45
- assetBuilds : false ,
46
- cache : false ,
47
- debugLog : false ,
48
- license : "" ,
49
- minify : false ,
50
- quiet : false ,
51
- sourceMap : false ,
52
- sourceMapRegister : false ,
53
- target : "es2020" ,
54
- v8cache : false ,
55
- watch : false
56
- } ) ;
57
- await fsWriteFile ( outputFilePath , code , { encoding : "utf8" } ) ;
58
43
let packageMeta = JSON . parse ( await fsReadFile ( pathJoin ( root , packageFileName ) , { encoding : "utf8" } ) ) ;
59
44
delete packageMeta . scripts ;
60
45
delete packageMeta . dependencies ;
61
46
delete packageMeta . devDependencies ;
62
47
await fsWriteFile ( pathJoin ( outputDirectoryPath , packageFileName ) , `${ JSON . stringify ( packageMeta , undefined , "\t" ) } \n` , { encoding : "utf8" } ) ;
48
+ console . log ( execSync ( `"${ pathJoin ( root , "node_modules" , ".bin" , process . platform === "win32" ? "webpack.cmd" : "webpack" ) } "` ) . toString ( "utf8" ) ) ;
0 commit comments