docsearch
docsearch copied to clipboard
import '@docsearch/css' not working in Next.js 13 appDir
Description
I am importing @docsearch/css
in a layout.tsx
file in the /app
directory. The CSS is not being loaded.
Steps to reproduce
-
npm i @docsearch/react
-
import '@docsearch/css'
inlayout.tsx
-
import { DocSearch } from '@docsearch/react'
inpage.tsx
- See error
Expected behavior
I would expect it to work the same as in _app.tsx
in the /pages
directory.
Environment
- OS: Windows
- Browser: Chrome
- DocSearch version: 3.3.0
My temporary fix is to duplicate the style.css
file from @docsearch/css
and import '#/styles/style.css'
in layout.tsx
.
Hi @trevorpfiz are you still seeing this issue by chance?
This may help. npm install @docsearch/js @docsearch/css
Closing -- a fresh install of Next.js and Docsearch shows this working as expected. Feel free to open a new issue if this persists.