Skip to content

Editor does not load in Next.js minified production build #292

Description

@dlwocks31

Describe the bug
The editor fails to load in a minified production build of Next.js. I have tested and reproduced the bug with the latest version of Blocknote (v0.8.3), and with both app and page directory of Next.js.

To Reproduce

  1. Clone the following repository: https://github.com/dlwocks31/blocknote-webpack-err-report . This is a minimal Next.js example with Blocknote added as described in documentation.
  2. Execute npm install && npm run build && npm run start to run the project.
  3. Navigate to localhost:3000 to find the error message: TypeError: e.fn is not a function.
image
  1. To disable webpack minification, uncomment the following lines in next.config.js:
      // optimization: {
      //   minimize: false,
      // }
  1. Rerun npm run build && npm run start and revisit localhost:3000 to find the project running normally.

Miscellaneous

  • Node version: v18.12.1
  • Package manager: npm 9.7.1
  • Browser: Chrome 115.0.5790.102

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions