Skip to content

Commit 3715582

Browse files
named exports working
with cjs
1 parent 041656e commit 3715582

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.4.0-alpha.2",
44
"description": "Shadcn Theme Editor",
55
"module": "dist/index.mjs",
6+
"main": "dist/index.js",
67
"types": "dist/index.d.ts",
78
"repository": {
89
"type": "git",

rollup.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ export default [
2525
{
2626
file: packageJson.main,
2727
format: "cjs",
28-
// sourcemap: true,
28+
exports: 'named',
29+
sourcemap: true,
2930
},
3031
{
3132
file: packageJson.module,
3233
format: "esm",
33-
// sourcemap: true,
34+
exports: 'named',
35+
sourcemap: true,
3436
},
3537

3638
],

src/components/editor-open.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
"use client";
21
import { useState } from "react";
32
import { Sidebar } from "./sidebar";
43
import clsx from "clsx";

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "./tailwind.css";
22
import ShadcnThemeEditor from "./components/editor-open";
33
import { setSavedTheme } from "./lib/set-saved-theme";
4-
export { Icons } from "./components/icons";
4+
import { Icons } from "./components/icons";
55

6-
export { setSavedTheme };
6+
export { Icons, setSavedTheme };
77
export default ShadcnThemeEditor;

0 commit comments

Comments
 (0)