Skip to content

Commit

Permalink
v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtallent committed Nov 3, 2024
1 parent 4febbc0 commit 07e22be
Show file tree
Hide file tree
Showing 6 changed files with 1,074 additions and 1,309 deletions.
14 changes: 13 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,17 @@
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {}
"rules": {},
"overrides": [
{
"files": ["*.cjs"],
"parserOptions": {
"sourceType": "script"
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"import/no-commonjs": "off"
}
}
]
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@
| | | Legacy UTF-8 charset declarations are now removed from inlined CSS files (#90) |
| 2024-03-03 | 2.0.1 | Fix array issue (#93, thanks @smac89!). Bump dependencies. |
| 2024-06-19 | 2.0.2 | Yet another fix for Preload marker removal, due to Vite 5.3 (#98). |
| 2024-11-03 | 2.0.3 | Fix inlined script/comment tags (#102) |
22 changes: 9 additions & 13 deletions fixup.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
const fs = require("node:fs")
const path = require("node:path")

function main(/* {string} */ project) {
const types = {
cjs: "commonjs",
esm: "module",
}

for (const [distribution, type] of Object.entries(types)) {
fs.writeFileSync(
path.join(project, "dist", distribution, "package.json"),
JSON.stringify({ type: type }, null, "\t")
)
}
function main(project) {
const types = {
cjs: "commonjs",
esm: "module",
}
for (const [distribution, type] of Object.entries(types)) {
fs.writeFileSync(path.join(project, "dist", distribution, "package.json"), JSON.stringify({ type: type }, null, "\t"))
}
}

if (require.main === module) {
main(path.dirname(require.main.filename))
main(path.dirname(require.main.filename))
}
Loading

0 comments on commit 07e22be

Please sign in to comment.