2025-07-16 22:29:28 +08:00
|
|
|
"use strict";
|
|
|
|
|
2024-01-14 18:11:12 +08:00
|
|
|
/** @type {import("../../../../").Configuration} */
|
|
|
|
module.exports = {
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.wat$/,
|
|
|
|
loader: "wast-loader",
|
|
|
|
type: "webassembly/async"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-01-16 10:25:30 +08:00
|
|
|
output: {
|
|
|
|
environment: {
|
|
|
|
dynamicImport: true,
|
|
|
|
asyncFunction: false
|
|
|
|
},
|
|
|
|
importFunctionName: "((name) => Promise.resolve({ request: name }))"
|
|
|
|
},
|
|
|
|
externals: {
|
|
|
|
"external-module": ["module module.js", "request"],
|
|
|
|
"external-import": ["import import.js", "request"],
|
|
|
|
"external-promise": "promise Promise.resolve('promise.js')"
|
|
|
|
},
|
2024-01-14 18:11:12 +08:00
|
|
|
experiments: {
|
|
|
|
asyncWebAssembly: true
|
|
|
|
}
|
|
|
|
};
|