Skip to content

@blocknote/mantine v0.40.0 incompatible with Mantine v8 with CSS import errors #2065

@kkartch

Description

@kkartch

Describe the bug
BlockNote v0.40.0 mentions that support was added for Mantine v8, but the build fails in a minimal Vite project due to incorrect CSS imports in @blocknote/mantine/src/mantineStyles.css.

Error:

Unable to resolve `@import "@mantine/core/styles/ScrollArea.css"` from /private/tmp/blocknote-mantine-test/node_modules/@blocknote/mantine/src
✓ 459 modules transformed.
✗ Build failed in 701ms
error during build:
[vite:css] [postcss] ENOENT: no such file or directory, open '@mantine/core/styles/ScrollArea.css'
file: /private/tmp/blocknote-mantine-test/node_modules/@blocknote/mantine/src/style.css:undefined:NaN
    at async open (node:internal/fs/promises:638:25)
    at async Object.readFile (node:internal/fs/promises:1238:14)
    at async Object.load (file:///private/tmp/blocknote-mantine-test/node_modules/vite/dist/node/chunks/dep-Bu492Fnd.js:43745:25)
    at async loadImportContent (file:///private/tmp/blocknote-mantine-test/node_modules/vite/dist/node/chunks/dep-D67CHC8_.js:673:19)
    at async Promise.all (index 0)
    at async resolveImportId (file:///private/tmp/blocknote-mantine-test/node_modules/vite/dist/node/chunks/dep-D67CHC8_.js:629:27)
    at async parseStyles$1 (file:///private/tmp/blocknote-mantine-test/node_modules/vite/dist/node/chunks/dep-D67CHC8_.js:537:5)
    at async Promise.all (index 0)
    at async resolveImportId (file:///private/tmp/blocknote-mantine-test/node_modules/vite/dist/node/chunks/dep-D67CHC8_.js:629:27)
    at async parseStyles$1 (file:///private/tmp/blocknote-mantine-test/node_modules/vite/dist/node/chunks/dep-D67CHC8_.js:537:5)

To Reproduce
I created a minimal Vite + React project and was able to reproduce the error with only packages added for BlockNote.

  • BlockNote v0.40.0 + Mantine v8.3.3 - Build fails
  • BlockNote v0.39.1 + Mantine v7.17.8 - Build succeeds

The example project is available here: https://github.com/kkartch/blocknote-mantine-v8-repro

Misc

  • Node version: v22.8.0
  • Package manager: pnpm v10.2.0
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions