Skip to content

Commit

Permalink
Fix build output
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKowalczyk committed May 27, 2023
1 parent 574d4dd commit 36b6980
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"scripts": {
"format": "prettier --write . --ignore-unknown --cache",
"format:check": "prettier --check . --cache",
"build:esm": "esbuild index.mjs --platform=node --format=esm --minify --outfile=dist/index.mjs",
"build:cjs": "esbuild index.cjs --platform=node --format=cjs --minify --outfile=dist/index.js",
"build:esm": "esbuild src/source.mjs --platform=node --format=esm --minify --outfile=dist/index.mjs",
"build:cjs": "esbuild src/source.cjs --platform=node --format=cjs --minify --outfile=dist/index.js",
"build": "pnpm run build:esm && pnpm run build:cjs",
"lint": "eslint . --ext .js,.ts",
"lint:fix": "eslint . --ext .js,.ts --fix"
Expand Down
10 changes: 10 additions & 0 deletions src/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Why 2 source files?

- Tailwind.css in version 3.3 introduced ESM support. Building the ESM file doesn't work, Tailwind.css needs plain output. So we have to build the ESM file and the CJS file separately.

```
npm run build:esm
npm run build:cjs
```

If you found a better solution, please let me know.
File renamed without changes.
File renamed without changes.

0 comments on commit 36b6980

Please sign in to comment.