cssinjs/jss

Next.js & amp & react-jss - amp-custom attribute gets striped from the <style> tag

Open

#1339 aperta il 29 apr 2020

Vedi su GitHub
 (2 commenti) (3 reazioni) (0 assegnatari)JavaScript (434 fork)batch import
feature requesthelp wantedquestion

Metriche repository

Star
 (7000 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hello!

I am not sure if what I'm about to describe is Next.js bug or react-jss's, but here we go:

Describe the bug: I'm trying to use react-jss with Next.js as described in Next.js official example. However if I try to use it with Next.js amp build configuration, amp-custom attribute gets striped from the <style> element.

I've created issue about it here: https://github.com/zeit/next.js/issues/12243.

Expected behavior: amp-custom attribute should not get striped from <style> tag in <head>.

Codesandbox link: As the issue is connected to Next.js, I couldn't really create a Sandbox link. Instead I've created repository with 2 Next.js projects (and different implementations of react-jss). Repo is here: Repo is here: https://github.com/cibulka/nextjs-amp-jss

Versions (please complete the following information):

  • jss: 10.1.1
  • Browser: Chrome
  • OS: macOS (10.15.4)

I'm only just starting with AMP, so I might be missing something obvious. Thank you!

Guida contributor