-
Notifications
You must be signed in to change notification settings - Fork 724
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
esm and cjs are produced by tsc rollup build all wasm loaders
- Loading branch information
Huguenin-Elie Steve
committed
Apr 1, 2021
1 parent
79a3b97
commit 8a56b64
Showing
7 changed files
with
69 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module.exports = { | ||
"presets": ["@babel/preset-typescript"], | ||
"presets": ["@babel/preset-env"], | ||
"env": { | ||
"esm": { | ||
"presets": [["@babel/preset-typescript", { "modules": false }]], | ||
"presets": [["@babel/preset-env", { "modules": false }]], | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
.DS_Store | ||
tmp | ||
node_modules | ||
npm-debug.log | ||
*.log | ||
package-lock.json | ||
yarn.lock | ||
dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import wasm from './untouched.wasm'; | ||
|
||
let modules; | ||
|
||
wasm({ ...imports }).then(({ instance }) => { | ||
modules = instance.exports | ||
}) | ||
|
||
export const { | ||
glMatrix, | ||
mat2, mat2d, mat3, mat4, | ||
quat, quat2, | ||
vec2, vec3, vec4 | ||
} = modules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import wasm from './optimized.wasm'; | ||
|
||
let modules; | ||
|
||
wasm({ ...imports }).then(({ instance }) => { | ||
modules = instance.exports | ||
}) | ||
|
||
export const { | ||
glMatrix, | ||
mat2, mat2d, mat3, mat4, | ||
quat, quat2, | ||
vec2, vec3, vec4 | ||
} = modules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters