cssinjs/jss

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

Open

#1 339 ouverte le 29 avr. 2020

Voir sur GitHub
 (2 commentaires) (3 réactions) (0 assignés)JavaScript (434 forks)batch import
feature requesthelp wantedquestion

Métriques du dépôt

Stars
 (7 000 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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!

Guide contributeur