Skip to content

Commit

Permalink
chore: 🤖 change extension to .mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf committed Jan 19, 2024
1 parent a4eb159 commit 07e794e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,11 @@ define WASM_RELEASE
rm -rf $(RELEASE)/$(WASM)
mkdir -p $(RELEASE)/$(WASM)
cp $(RUNTIME_FFI)/$(WASM_BUILD)/$(BUILD)/$(WASM_MODULE).wasm \
$(RUNTIME_FFI)/$(WASM_BUILD)/$(BUILD)/$(WASM_MODULE).js \
$(RUNTIME_FFI)/$(WASM_BUILD)/$(BUILD)/$(WASM_MODULE).d.ts \
$(RELEASE)/$(WASM)
cp $(RUNTIME_FFI)/$(WASM_BUILD)/$(BUILD)/$(WASM_MODULE).d.ts \
$(RELEASE)/$(WASM)
cp $(RUNTIME_FFI)/$(WASM_BUILD)/$(BUILD)/$(WASM_MODULE).js \
$(RELEASE)/$(WASM)/$(WASM_MODULE).mjs
cd $(RELEASE)/$(WASM) && \
rm -f $(DOTLOTTIE_PLAYER).$(WASM).tar.gz && \
tar zcf $(DOTLOTTIE_PLAYER).$(WASM).tar.gz *
Expand Down
4 changes: 2 additions & 2 deletions web-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<canvas style="width: 100%"></canvas>
</div>
<script type="module">
import createDotLottiePlayerModule from "./release/wasm/DotLottiePlayer.js";
import createDotLottiePlayerModule from "./release/wasm/DotLottiePlayer.mjs";

const Module = await createDotLottiePlayerModule({
locateFile: (path, prefix) => {
if (path.endsWith(".wasm")) {
return `./release/wasm/${path}`;
return `release/wasm/${path}`;
}
return `${prefix}${path}`;
},
Expand Down

0 comments on commit 07e794e

Please sign in to comment.