Skip to content

Commit

Permalink
Fix package file generation
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Feb 17, 2023
1 parent b66e360 commit 1a07e81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ async function buildIcons(package, style, format) {
async function buildExports(styles) {
let pkg = {}

// To appease Vite's optimizeDeps feature which requires a root-level import
pkg[`.`] = {
import: `./index.esm.js`,
require: `./index.js`,
}

// For those that want to read the version from package.json
pkg[`./package.json`] = { "default": "./package.json" }

Expand Down

0 comments on commit 1a07e81

Please sign in to comment.