Skip to content

Commit

Permalink
fix(exports): include additional exports in package.json (#316)
Browse files Browse the repository at this point in the history
Fixes #315
  • Loading branch information
metonym committed Jan 5, 2024
1 parent d714e6f commit 12e7830
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion scripts/npm-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function npmPackage() {
fs.rmSync("./package/src", { recursive: true, force: true });

const pkgJson = JSON.parse(
fs.readFileSync("./package/package.json", "utf-8"),
fs.readFileSync("./package/package.json", "utf-8")
);

delete pkgJson.scripts;
Expand All @@ -35,14 +35,30 @@ async function npmPackage() {
"./styles/*.css": {
import: "./styles/*.css",
},
"./styles": {
types: "./styles/index.d.ts",
import: "./styles/index.js",
},
"./styles/*": {
types: "./styles/*.d.ts",
import: "./styles/*.js",
},
"./styles/*.js": {
types: "./styles/*.d.ts",
import: "./styles/*.js",
},
"./languages": {
types: "./languages/index.d.ts",
import: "./languages/index.js",
},
"./languages/*": {
types: "./languages/*.d.ts",
import: "./languages/*.js",
},
"./languages/*.js": {
types: "./languages/*.d.ts",
import: "./languages/*.js",
},
"./package.json": "./package.json",
};

Expand Down

0 comments on commit 12e7830

Please sign in to comment.