Skip to content

Commit

Permalink
fix ideal-image warning due to missing hash:
Browse files Browse the repository at this point in the history
> Conflict: Multiple assets emit different content to the same filename assets/ideal-img/datagit.100.png
see #4089 (comment)
  • Loading branch information
slorber committed Apr 30, 2021
1 parent 2f21d30 commit fd7aa2b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/docusaurus-plugin-ideal-image/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export default function (
rules: [
{
test: /\.(png|jpe?g)$/i,
type: 'javascript/auto',
generator: {
emit: !isServer,
},
use: [
require.resolve('@docusaurus/lqip-loader'),
{
Expand All @@ -44,9 +40,8 @@ export default function (
emitFile: !isServer, // don't emit for server-side rendering
disable: !isProd,
adapter: require('@docusaurus/responsive-loader/sharp'),
name: isProd
? 'assets/ideal-img/[name].[hash:hex:7].[width].[ext]'
: 'assets/ideal-img/[name].[width].[ext]',
name:
'assets/ideal-img/[name].[contenthash:8].[width].[ext]',
...options,
},
},
Expand Down

0 comments on commit fd7aa2b

Please sign in to comment.