Skip to content

[legacy-framework] Fix bug preventing use of next-compose-plugins#746

Merged
flybayer merged 1 commit intocanaryfrom
fix-config2
Jul 13, 2020
Merged

[legacy-framework] Fix bug preventing use of next-compose-plugins#746
flybayer merged 1 commit intocanaryfrom
fix-config2

Conversation

@flybayer
Copy link
Member

What are the changes and their implications?

This fixes the following error:

Client:

Error: Failed to parse json from request ...

Server:

TypeError: Cannot destructure property 'defaultConfig' of 'undefined' as it is undefined.
    at /Users/simon/Code/philharmonic/node_modules/next-compose-plugins/lib/index.js:18:3
...

With a config like this:

const withPlugins = require("next-compose-plugins")
const withTM = require("next-transpile-modules")(["heroicons"])
module.exports = withPlugins([withTM], {
  webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
    // Note: we provide webpack above so you should not `require` it
    // Perform customizations to webpack config
    // Important: return the modified config
    return config
  },
  webpackDevMiddleware: (config) => {
    // Perform customizations to webpack dev middleware config
    // Important: return the modified config
    return config
  },
})

Checklist

  • Tests added for changes
  • PR submitted to blitzjs.com for any user facing changes

@flybayer flybayer merged commit 4eb00cf into canary Jul 13, 2020
@flybayer flybayer deleted the fix-config2 branch July 13, 2020 12:23
@itsdillon itsdillon changed the title Fix bug preventing use of next-compose-plugins [legacy-framework] Fix bug preventing use of next-compose-plugins Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant