Skip to content

Commit

Permalink
switch to esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Nov 7, 2023
1 parent 178a0cd commit 0918aa9
Show file tree
Hide file tree
Showing 20 changed files with 1,651 additions and 6,481 deletions.
20 changes: 20 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as esbuild from 'esbuild';
import { polyfillNode } from "esbuild-plugin-polyfill-node";

await esbuild.build({
platform: "browser",
entryPoints: ['src/index.ts'],
bundle: true,
outfile: 'dist/bundle.js',
resolveExtensions:['.tsc', '.ts','.js'],
// external: ['THREE'],
define: {
'global': 'window',
},
loader: {
".node":"file"
},
globalName:"MineRender",
plugins: [polyfillNode()],
});
setTimeout(() => process.exit(0), 100);
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ function bundle(watch) {
cache: {},
packageCache: {},
debug: true,
standalone: "MineRender"
standalone: "MineRender",
insertGlobals: true,
}
))
.plugin(tsify, {
Expand Down
Loading

0 comments on commit 0918aa9

Please sign in to comment.