twopluszero / next-images

Import images in Next.js (supports jpg, jpeg, svg, png and gif images)
MIT License
949 stars 67 forks source link

Not working with webpack 5 beta #42

Closed valse closed 4 years ago

valse commented 4 years ago

Hi, I'm trying to add the webpack 5 beta but I have this error on compilation:

Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema
- configuration[0].module.rules[2].issuer has an unknown property 'test'.
name: 'ValidationError',
  errors: [
    {
      keyword: 'oneOf',
      dataPath: '[0].module.rules',
      schemaPath: '#/properties/rules/oneOf',
      params: [Object],
      message: 'should match exactly one schema in oneOf',
      schema: [Array],
      parentSchema: [Object],
      data: [Array],
      children: [Array]
    },
    {
      keyword: 'oneOf',
      dataPath: '[1].module.rules',
      schemaPath: '#/properties/rules/oneOf',
      params: [Object],
      message: 'should match exactly one schema in oneOf',
      schema: [Array],
      parentSchema: [Object],
      data: [Array],
      children: [Array]
    }
  ],

Maybe are you missing the oneOf rule before the use one?

arefaslani commented 4 years ago

@chuyik @valse Just released a new patch considering the update. Thanks @chuyik. Checkout version 1.4.1.