Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/angular/build/src/tools/esbuild/wasm-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function createWasmPlugin(options: WasmPluginOptions): Plugin {
return {
name: 'angular-wasm',
setup(build): void {
build.onResolve({ filter: /.wasm$/ }, async (args) => {
build.onResolve({ filter: /\.wasm$/ }, async (args) => {
// Skip if already resolving the WASM file to avoid infinite resolution
if (args.pluginData?.[WASM_RESOLVE_SYMBOL]) {
return;
Expand Down Expand Up @@ -94,7 +94,7 @@ export function createWasmPlugin(options: WasmPluginOptions): Plugin {
});

build.onLoad(
{ filter: /.wasm$/, namespace: WASM_INIT_NAMESPACE },
{ filter: /\.wasm$/, namespace: WASM_INIT_NAMESPACE },
createCachedLoad(cache, async (args) => {
// Ensure async mode is supported
if (!allowAsync) {
Expand Down Expand Up @@ -194,7 +194,7 @@ export function createWasmPlugin(options: WasmPluginOptions): Plugin {
}),
);

build.onLoad({ filter: /.wasm$/, namespace: WASM_CONTENTS_NAMESPACE }, async (args) => {
build.onLoad({ filter: /\.wasm$/, namespace: WASM_CONTENTS_NAMESPACE }, async (args) => {
const contents = args.pluginData.wasmContents ?? (await readFile(args.path));

let loader: 'binary' | 'file' = 'file';
Expand Down