speced / respec

A tool for creating technical documents and web standards
https://respec.org/
Other
718 stars 388 forks source link

Remove direct imports for texts #1672

Open saschanaz opened 6 years ago

saschanaz commented 6 years ago

(From #1671)

We currently depends on requirejs/text by importing CSS/JS files by e.g. import css from "deps/text!core/css/bp.css";, instead we should do:

hyperHTML`<link rel="stylesheet" href="${new URL("../core/css.bp.css", import.meta.url)}" />`

The files then should be served separately, but ultimately we should do the same for ES modules (#1640).

Swapnilr1 commented 5 years ago

@saschanaz Can I work on this issue, assuming this is still relevant?

saschanaz commented 5 years ago

I think we are not ready to do this yet. We need to support relative paths via import.meta.url so that respec can be run anywhere, but webpack does not support import.meta yet. (https://github.com/webpack/webpack/issues/6719)