Skip to content

Commit

Permalink
fix!: don't delete "main" in package.json
Browse files Browse the repository at this point in the history
esbuild still doesn't support exports evanw/esbuild#187
it's uncertain as yet what impact this might have on other bundlers and
loaders, hence this is a BREAKING CHANGE.
  • Loading branch information
rvagg committed Mar 5, 2021
1 parent 782fa5e commit 8736b90
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class Package {
const json = copy(this.pkgjson)

delete json.type
delete json.main
json.browser = {}
json.exports = {}
const _join = (...args) => './' + join(...args)
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/pkg-kitchensink/output-notests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "pkg-kitchensink",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/pkg-kitchensink/output-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "pkg-kitchensink",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 8736b90

Please sign in to comment.