diff --git a/src/images/next-image-loader-stub.ts b/src/images/next-image-loader-stub.ts index d735156..45e34dc 100644 --- a/src/images/next-image-loader-stub.ts +++ b/src/images/next-image-loader-stub.ts @@ -12,7 +12,7 @@ const nextImageLoaderStub: RawLoaderDefinition = function ( const { filename } = this.getOptions() const outputPath = interpolateName( this, - filename.replace('[ext]', '.[ext]'), + filename?.replace('[ext]', '.[ext]'), { context: this.rootContext, content