cssinjs/jss

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

Open

#1.339 aberto em 29 de abr. de 2020

Ver no GitHub
 (2 comments) (3 reactions) (0 assignees)JavaScript (434 forks)batch import
feature requesthelp wantedquestion

Métricas do repositório

Stars
 (7.000 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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!

Guia do colaborador