You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing any module/export from gl-matrix, using typescript, and --experimental-scope-hoisting, the resulting bundle is devoid of all gl-matrix code. The bundle for the gist linked below looks like this, for example:
馃悰 bug report
When importing any module/export from gl-matrix, using typescript, and
--experimental-scope-hoisting
, the resulting bundle is devoid of all gl-matrix code. The bundle for the gist linked below looks like this, for example:I've tried as many variations of
import
and paths that I can think of, but still cannot get gl-matrix included in the final bundle.Perhaps I'm doing something wrong!
馃帥 Configuration (.babelrc, package.json, cli command)
Completely unconfigured, aside from experimental scope hoisting and
--no-minify
for the sake of readability when debugging.https://gist.github.com/kirbysayshi/f1c38d272cb3d5832342f8fc5c689fb6
馃 Expected Behavior
mat4 / gl-matrix is included in the bundle
馃槸 Current Behavior
Nothing from gl-matrix is included in the bundle, aside from the name assigned to the import statement.
All code that depends on gl-matrix fails, since it's not there.
馃拋 Possible Solution
I haven't been able to find a workaround, and have tried:
require
.The only thing that works so far is to not use TypeScript! Included in the gist is an index.js file to demonstrate that.
I've also tried using a simple
require
statement, which also fails to include gl-matrix:Which results in:
Which, by the way, is amazingly small! Once this issue gets fixed a zero-conf tree shaking + scope hoisting is going to be a killer feature!
馃敠 Context
Just trying to use TypeScript plus the scope hoisting to cut down on bundle size! In this case it's for the JS13K competition that starts soon.
馃捇 Code Sample
https://gist.github.com/kirbysayshi/f1c38d272cb3d5832342f8fc5c689fb6
See above for steps to reproduce!
The text was updated successfully, but these errors were encountered: