Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: nodejs esm interop #512

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/alias/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/alias.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/auto-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/auto-install.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"Bogdan Chadkin <[email protected]>",
"Mateusz Burzyński <[email protected]> (https://github.com/Andarist)"
],
"module": "dist/index.es.js",
"module": "dist/babel.mjs",
"peerDependenciesMeta": {
"@types/babel__core": {
"optional": true
Expand Down
2 changes: 1 addition & 1 deletion packages/buble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"!**/types.ts"
]
},
"module": "dist/rollup-plugin-buble.es.js",
"module": "dist/rollup-plugin-buble.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/commonjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/commonjs.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/data-uri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/data-uri.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/dsv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/dsv.mjs"
}
2 changes: 1 addition & 1 deletion packages/dynamic-import-vars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
"!**/snapshots/**"
]
},
"module": "dist/index.es.js"
"module": "dist/dynamic-import-vars.mjs"
}
2 changes: 1 addition & 1 deletion packages/image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/image.mjs"
}
2 changes: 1 addition & 1 deletion packages/inject/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/inject.mjs"
}
2 changes: 1 addition & 1 deletion packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/json.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/legacy.mjs"
}
2 changes: 1 addition & 1 deletion packages/multi-entry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/multi-entry.mjs"
}
8 changes: 4 additions & 4 deletions packages/node-resolve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "Rich Harris <[email protected]>",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/node-resolve/#readme",
"bugs": "https://github.com/rollup/plugins/issues",
"main": "./dist/cjs/index.js",
"main": "./dist/index.js",
"engines": {
"node": ">= 8.0.0"
},
Expand Down Expand Up @@ -77,10 +77,10 @@
]
},
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/es/index.js"
"require": "./dist/index.js",
"import": "./dist/node-resolve.mjs"
},
"module": "./dist/es/index.js",
"module": "./dist/node-resolve.mjs",
"type": "commonjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/node-resolve/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ export default {
external: Object.keys(pkg.dependencies).concat(['fs', 'path', 'os', 'util']),
output: [
{ file: pkg.main, format: 'cjs', exports: 'named' },
{ file: pkg.module, format: 'es', plugins: [emitModulePackageFile()] }
{ file: pkg.module, format: 'es', plugins: [] }
]
};
8 changes: 4 additions & 4 deletions packages/pluginutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"bugs": {
"url": "https://github.com/rollup/plugins/issues"
},
"main": "./dist/cjs/index.js",
"main": "./dist/index.js",
"engines": {
"node": ">= 8.0.0"
},
Expand Down Expand Up @@ -76,10 +76,10 @@
]
},
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/es/index.js"
"require": "./dist/index.js",
"import": "./dist/pluginutils.mjs"
},
"module": "./dist/es/index.js",
"module": "./dist/pluginutils.mjs",
"nyc": {
"extension": [
".js",
Expand Down
2 changes: 1 addition & 1 deletion packages/pluginutils/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export default {
external: [...builtinModules, 'picomatch'],
output: [
{ file: pkg.main, format: 'cjs', exports: 'named' },
{ file: pkg.module, format: 'es', plugins: [emitModulePackageFile()] }
{ file: pkg.module, format: 'es', plugins: [] }
]
};
4 changes: 2 additions & 2 deletions packages/replace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "Rich Harris <[email protected]>",
"homepage": "https://github.com/rollup/plugins/tree/master/packages/replace#readme",
"bugs": "https://github.com/rollup/plugins/issues",
"main": "dist/rollup-plugin-replace.cjs.js",
"main": "dist/index.js",
"scripts": {
"build": "rollup -c",
"ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov",
Expand Down Expand Up @@ -65,6 +65,6 @@
"!**/types.ts"
]
},
"module": "dist/rollup-plugin-replace.es.js",
"module": "dist/replace.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/run.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/strip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/strip.mjs"
}
2 changes: 1 addition & 1 deletion packages/sucrase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/surase.mjs"
}
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js",
"module": "dist/itypescript.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/url.mjs"
}
2 changes: 1 addition & 1 deletion packages/virtual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/virtual.mjs"
}
2 changes: 1 addition & 1 deletion packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
"Jamen Marz <[email protected]>",
"Colin Eberhardt <[email protected]>"
],
"module": "dist/index.es.js",
"module": "dist/wasm.mjs",
"types": "types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/yaml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
"!**/types.ts"
]
},
"module": "dist/index.es.js"
"module": "dist/yaml.mjs"
}