remove wasm file extension rename workaround

This modifies the webpack config instead of renaming the .wasm file
to workaround default webpack behavior regarding import .wasm files.
This commit is contained in:
David Lechner
2021-01-11 16:47:49 -06:00
parent d04e022e83
commit 69e52be259
6 changed files with 19 additions and 12 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ declare module '*.json' {
export default src;
}
declare module '*.emcwasm' {
declare module '*.wasm' {
const src: string;
export default src;
}
-1
View File
@@ -1 +0,0 @@
*.emcwasm
+1 -1
View File
@@ -2,6 +2,7 @@
// Copyright (c) 2020 The Pybricks Authors
import { CompileResult, compile as mpyCrossCompile } from '@pybricks/mpy-cross-v5';
import wasm from '@pybricks/mpy-cross-v5/build/mpy-cross.wasm';
import { call, put, takeEvery } from 'redux-saga/effects';
import {
MpyActionType,
@@ -9,7 +10,6 @@ import {
didCompile,
didFailToCompile,
} from '../actions/mpy';
import wasm from './mpy-cross.emcwasm';
/**
* Compiles a script to .mpy and dispatches either didCompile on success or