Skip to content

Commit cc801f3

Browse files
committed
feat: wiring up critical fonts to behave differently in local dev vs prod mode (meant to help speed up local development)
1 parent 0da84d5 commit cc801f3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// import { polyfillLoader } from '@bolt/core';
2+
3+
if (!bolt.config.prod){
4+
import(/* webpackMode: 'lazy', webpackChunkName: 'bolt-font-loader' */ './src/critical-fonts.js');
5+
} else {
6+
import( /* webpackMode: 'eager', webpackChunkName: 'bolt-font-loader' */ './src/critical-fonts.js');
7+
}

packages/components/bolt-critical-fonts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"publishConfig": {
2121
"access": "public"
2222
},
23-
"main": "src/critical-fonts.js",
23+
"main": "index.js",
2424
"style": "src/critical-fonts.scss",
2525
"homepage": "https://bolt-design-system.com"
2626
}

0 commit comments

Comments
 (0)