Skip to content

Commit 7769594

Browse files
Merge pull request #2 from anthonyleung-dev/import-fontsourceroboto-vite-bundler
fix: #1 font import issue
2 parents cd92f6b + 2957bb4 commit 7769594

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@ __tests__/
5353
/examples/
5454
/Dockerfile
5555
/docker-compose.yml
56+
57+
/storybook-static/

.storybook/preview.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import type { Preview } from '@storybook/react'
22

3-
import '@fontsource/roboto/300.css'
4-
import '@fontsource/roboto/400.css'
5-
import '@fontsource/roboto/500.css'
6-
import '@fontsource/roboto/700.css'
7-
import 'material-symbols'
83
import '../src/styles.css'
94

105
const preview: Preview = {

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.7] - 2024-04-01
11+
12+
### Fixed
13+
- Fixed the @fontsource/roboto css import issue in vite bundler.
14+
1015
## [1.0.6] - 2024-04-01
1116

1217
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-material-web",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "A React Material components using material web and lit/react",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@import 'material-symbols';
2-
@import '~@fontsource/roboto';
2+
@import '@fontsource/roboto';
33

44
label {
55
display: inline-flex;
66
place-items: center;
77
gap: 8px;
8-
font-family: Roboto, system-ui;
8+
font-family: "Roboto", system-ui;
99
color: var(--md-sys-color-on-background, #000);
1010
}
1111

0 commit comments

Comments
 (0)