From 83c54db836ce74e844d0f14f15feed8c78cf38e1 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 7 Sep 2021 14:50:52 -0700 Subject: [PATCH] more words Former-commit-id: 7ad294cded991218c79f9036ba9a632a87d05634 [formerly 78058ac327ae266296588613d97391aa470f49a6] Former-commit-id: 7eb9207a6e9c3667439228b760945f8f2f6049d9 --- README.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 085d3d8f4e..7fc1d09818 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Bun is a project with incredibly large scope, and it's early days. | Feature | In | | ---------------------------------------------------------------------------------------------------------------------- | -------------- | | Symlinks | Resolver | -| Stateful Fast Refresh | JSX Transpiler | +| [Finish Fast Refresh](https://github.com/Jarred-Sumner/bun/issues/18) | JSX Transpiler | | Source Maps | JavaScript | | Source Maps | CSS | | [Private Class Fields](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) | JS Transpiler | @@ -109,9 +109,9 @@ Bun is a project with incredibly large scope, and it's early days. | [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) | Bun.js | | `bun run` command | Bun.js | -JS Transpiler == JavaScript Transpiler -TS Transpiler == TypeScript Transpiler -Bun.js == Bun's JavaScriptCore integration that executes JavaScript. Similar to how Node.js & Deno embed V8. +JS Transpiler == JavaScript Transpiler
+TS Transpiler == TypeScript Transpiler
+Bun.js == Bun's JavaScriptCore integration that executes JavaScript. Similar to how Node.js & Deno embed V8.
### Limitations & intended usage @@ -202,11 +202,30 @@ This is useful for preventing flash of unstyled content. Bun bundles `.css` files imported via `@import` into a single file. It doesn't autoprefix or minify CSS today. Multiple `.css` files imported in one JavaScript file will _not_ be bundled into one file. You'll have to import those from a `.css` file. +This input: + +```css +@import url("./hi.css"); +@import url("./hello.css"); +@import url("./yo.css"); +``` + +Becomes: + +```css +/* hi.css */ +/* ...contents of hi.css */ +/* hello.css */ +/* ...contents of hello.css */ +/* yo.css */ +/* ...contents of yo.css */ +``` + #### CSS runtime To support hot CSS reloading, Bun inserts `@supports` annotations into CSS that tag which files a stylesheet is composed of. Browsers ignore this, so it doesn't impact styles. -By default, Bun's runtime code automatically listens to `onimportcss` and will insert the `event.detail` into a `` if there is no existing `link` tag with that stylesheet. +By default, Bun's runtime code automatically listens to `onimportcss` and will insert the `event.detail` into a `` if there is no existing `link` tag with that stylesheet. That's how Bun's equivalent of `style-loader` works. ### Frameworks