X 归档 2020-12-03
I should write about the CSS optimization in WMR. So many things that had to be done to make the output ideal...
Example: foo.js dynamically imports bar.js, which imports some CSS. WMR preloads that CSS at the import(), or if small enough, inlines it into a parent CSS file.
Example: foo.js dynamically imports bar.js, which imports some CSS. WMR preloads that CSS at the import(), or if small enough, inlines it into a parent CSS file.
我应该写写 WMR 中的 CSS 优化。为了让输出达到理想状态,要做的事情实在太多……
例如:foo.js 动态导入 bar.js,而 bar.js 又导入了一些 CSS。WMR 会在 import() 处预加载这些 CSS,如果足够小,就直接内联到父级 CSS 文件里。
例如:foo.js 动态导入 bar.js,而 bar.js 又导入了一些 CSS。WMR 会在 import() 处预加载这些 CSS,如果足够小,就直接内联到父级 CSS 文件里。
