Skip to content

Commit 9ba51a6

Browse files
committed
add back bundle
1 parent 7fff0e5 commit 9ba51a6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

build/bundle.mjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Loads each of the chunks produced by the first Rollup pass.
2+
// The custom AMD define() in intro.js will combined the shared
3+
// and worker chunks into a worker bundle that can be instantiated
4+
// via blob URL.
5+
6+
import './shared'; // shared code between main and worker threads
7+
import './scene_worker'; // worker code, gets turned into a blob URL used to instantiate workers
8+
import './index'; // main thread code, gets exported as main library below
9+
10+
// This allows the rollup ESM build to work within a <script type="module"> tag
11+
// Script modules can't expose exports
12+
try {
13+
Tangram.debug.ESM = _ESM; // mark build as ES module
14+
Tangram.debug.SHA = _SHA;
15+
if (_ESM === true && typeof window === 'object') {
16+
window.Tangram = Tangram;
17+
}
18+
} catch(e) {}
19+
20+
export default Tangram;

0 commit comments

Comments
 (0)