diff --git a/src/package/index.js b/src/package/index.js index 9fef037..533f983 100644 --- a/src/package/index.js +++ b/src/package/index.js @@ -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) diff --git a/test/fixtures/pkg-kitchensink/output-notests/package.json b/test/fixtures/pkg-kitchensink/output-notests/package.json index e1b70af..3f3ffbc 100644 --- a/test/fixtures/pkg-kitchensink/output-notests/package.json +++ b/test/fixtures/pkg-kitchensink/output-notests/package.json @@ -2,6 +2,7 @@ "name": "pkg-kitchensink", "version": "0.0.0", "description": "", + "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/test/fixtures/pkg-kitchensink/output-tests/package.json b/test/fixtures/pkg-kitchensink/output-tests/package.json index e1b70af..3f3ffbc 100644 --- a/test/fixtures/pkg-kitchensink/output-tests/package.json +++ b/test/fixtures/pkg-kitchensink/output-tests/package.json @@ -2,6 +2,7 @@ "name": "pkg-kitchensink", "version": "0.0.0", "description": "", + "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" },