Hermes: [Website] missing normalize.css

Created on 10 Dec 2020  路  4Comments  路  Source: facebook/hermes

Description

The website is requesting normalize.css from https://hermesengine.dev/Users/jsx/github/hermes/website/node_modules/normalize.css/normalize.css, which seems to be based on whoever built and deployed the website to production.

This same issue repros if you build the site locally.

This path seems to come from

stylesheets: [
  require.resolve('./node_modules/normalize.css/normalize.css'),
],

in hermes/website/docusaurus.config.js

help wanted website

Most helpful comment

@slorber thanks for jumping in to help!
The clientModules looks exactly like what we want. I will try it late today 馃ぉ

All 4 comments

The stylesheets option in docusaurus.config.js is only for external stylesheets. To include stylesheets installed via npm, one would have to create a plugin and use the getClientModules() lifecycle method which is too much hassle and I'd rather just copy the css under /static.

But I worried that css from /static is not hashed (though it might not be changed often).

Alternatively, find a CDN version of the CSS.
However, I am not sure which CDN are the most reliable one to use (globally)?

Hi,

We have a "clientModules" available in config now:
https://v2.docusaurus.io/docs/docusaurus.config.js/#clientmodules

Also, you can create a local plugin quite easily:
https://v2.docusaurus.io/docs/using-plugins#creating-plugins

@slorber thanks for jumping in to help!
The clientModules looks exactly like what we want. I will try it late today 馃ぉ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

willholen picture willholen  路  4Comments

Gregoirevda picture Gregoirevda  路  3Comments

benkane picture benkane  路  5Comments

ghost picture ghost  路  5Comments

jacque006 picture jacque006  路  4Comments