Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import '@docsearch/css' not working in Next.js 13 appDir #1696

Closed
trevorpfiz opened this issue Dec 7, 2022 · 4 comments
Closed

import '@docsearch/css' not working in Next.js 13 appDir #1696

trevorpfiz opened this issue Dec 7, 2022 · 4 comments

Comments

@trevorpfiz
Copy link

Description

I am importing @docsearch/css in a layout.tsx file in the /app directory. The CSS is not being loaded.

Steps to reproduce

  1. npm i @docsearch/react
  2. import '@docsearch/css' in layout.tsx
  3. import { DocSearch } from '@docsearch/react' in page.tsx
  4. 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
@trevorpfiz
Copy link
Author

My temporary fix is to duplicate the style.css file from @docsearch/css and import '#/styles/style.css' in layout.tsx.

@8bittitan
Copy link
Contributor

Hi @trevorpfiz are you still seeing this issue by chance?

@807573212
Copy link

This may help. npm install @docsearch/js @docsearch/css

@levimichael
Copy link
Contributor

Closing -- a fresh install of Next.js and Docsearch shows this working as expected. Feel free to open a new issue if this persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants