File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1+ import { assert } from '@metamask/utils' ;
12import { basename } from 'path' ;
23import type { Watching } from 'webpack' ;
34
@@ -39,6 +40,11 @@ export async function watch(
3940 return ;
4041 }
4142
43+ assert (
44+ compiler . watching ,
45+ 'Expected `compiler.watching` to be defined.' ,
46+ ) ;
47+
4248 resolve ( compiler . watching ) ;
4349 } ,
4450 ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import type { Ora } from 'ora';
55import type {
66 Compiler ,
77 ProvidePlugin ,
8- ResolvePluginInstance ,
98 Resolver ,
109 StatsError ,
1110 WebpackPluginInstance ,
@@ -231,6 +230,13 @@ export class SnapsWatchPlugin implements WebpackPluginInstance {
231230 }
232231}
233232
233+ /**
234+ * Webpack's resolver plugin interface, which is not exported by Webpack.
235+ */
236+ type ResolverPlugin = {
237+ apply : ( resolver : Resolver ) => void ;
238+ } ;
239+
234240/**
235241 * The options for the {@link SnapsBuiltInResolver}.
236242 */
@@ -247,7 +253,7 @@ export type SnapsBuiltInResolverOptions = {
247253 * plugin is used to warn the user when they try to import a built-in module,
248254 * when no fallback is configured.
249255 */
250- export class SnapsBuiltInResolver implements ResolvePluginInstance {
256+ export class SnapsBuiltInResolver implements ResolverPlugin {
251257 /**
252258 * The built-in modules that have been imported, but not resolved.
253259 */
You can’t perform that action at this time.
0 commit comments