This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pigment and replace rollup with vite
- Loading branch information
1 parent
94a311e
commit 02bf147
Showing
5 changed files
with
828 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { defineConfig } from "vite"; | ||
import react from "@vitejs/plugin-react"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
import dts from "vite-plugin-dts"; | ||
import { pigment } from "@pigment-css/vite-plugin"; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
pigment({ theme: {} }), | ||
react(), // Supports React JSX | ||
tsconfigPaths(), // Supports TS path aliasing | ||
dts({ | ||
insertTypesEntry: true, // This option adds an entry for the type definitions in your package.json | ||
}), | ||
], | ||
build: { | ||
outDir: "dist", | ||
lib: { | ||
entry: "src/index.tsx", | ||
formats: ["es", "cjs"], | ||
fileName: (format) => `bundle.${format}.js`, | ||
}, | ||
rollupOptions: { | ||
external: ["react", "react-dom"], | ||
output: { | ||
globals: { | ||
react: "React", | ||
"react-dom": "ReactDOM", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.