Skip to content

Commit fc3c27a

Browse files
committed
export global CSS in the package
1 parent 4c98b3b commit fc3c27a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"import": "./lib/index.es.min.js",
1717
"require": "./lib/index.umd.min.js"
1818
},
19+
"./global.css": "./lib/global.css",
1920
"./hyperparam.css": "./lib/hyperparam.css"
2021
},
2122
"bin": {
@@ -29,7 +30,7 @@
2930
],
3031
"scripts": {
3132
"build:types": "tsc -b",
32-
"build:lib": "vite build -c vite.lib.config.ts",
33+
"build:lib": "vite build -c vite.lib.config.ts && cp src/styles/global.css lib/global.css",
3334
"build:app": "vite build",
3435
"build": "run-s build:lib build:types build:app",
3536
"coverage": "vitest run --coverage --coverage.include=src --coverage.include=bin",

src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { StrictMode } from 'react'
22
import { createRoot } from 'react-dom/client'
33
import App from './components/App.js'
4-
import './styles/app.css'
4+
import './styles/global.css'
55

66
const root = document.getElementById('app')
77
if (!root) throw new Error('missing root element')

0 commit comments

Comments
 (0)