Skip to content

Commit 1a8cc55

Browse files
authored
Removed unused Webpack config for sharp (#335)
1 parent 20e4e7c commit 1a8cc55

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/with-next-video.ts

-14
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,6 @@ export function withNextVideo(nextConfig: any, videoConfig?: VideoConfig) {
8484
);
8585
}
8686

87-
if (Array.isArray(config.externals)) {
88-
config.externals.unshift({
89-
sharp: 'commonjs sharp',
90-
});
91-
} else {
92-
config.externals = Object.assign(
93-
{},
94-
{
95-
sharp: 'commonjs sharp',
96-
},
97-
config.externals
98-
);
99-
}
100-
10187
config.infrastructureLogging = {
10288
...config.infrastructureLogging,
10389
// Silence warning about dynamic import of next.config file.

tests/with-next-video.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ describe('withNextVideo', () => {
9292
};
9393
const webpackConfig = result.webpack(config, options);
9494

95-
assert.equal(webpackConfig.externals[0].sharp, 'commonjs sharp');
9695
assert.equal(webpackConfig.module.rules.length, 2);
9796
assert.deepEqual(webpackConfig.infrastructureLogging, { level: 'error' });
9897
});

0 commit comments

Comments
 (0)