如果 ts/js 文件不使用node_modules,则此代码在浏览器中工作。
// js bundle
result := api.Build(api.BuildOptions{
EntryPoints: []string{Srcdir + path + "app.ts"},
Platform: api.PlatformNode,
Bundle: true,
MinifySyntax: true,
MinifyWhitespace: true,
GlobalName: "api",
Inject: []string{GOROOT + "/misc/wasm/wasm_exec.js", "lib/config/gostart.js"},
Outfile: Outdir + path + "app.js",
Write: true,
})
我需要导入node_modules我该怎么做