![]() ![]() Previously repeated compilation of the same source code using vm.Script stopped hitting the V8 compilation cache after v16.x when support for importModuleDynamically was added to vm.Script, resulting in a performance regression that blocked users (in particular Jest users) from upgrading from v16.x. vm: fix V8 compilation cache support for vm.Script cjs, will opt out of detection.Ĭontributed by Geoffrey Booth in #50096. The presence of a type field, or explicit extensions We hope to make detection enabled by default in a future version of Node.js.ĭetection increases startup time, so we encourage everyone - especially packageĪuthors - to add a type field to package.json, even for the default The same applies to string input via -eval or STDIN. ![]() Will parse the file to detect ES module syntax if found, it will run the fileĪs an ES module, otherwise it will run the file as a CommonJS module. js or extensionless files with no package.json with a type field, Node.js The new flag -experimental-detect-module can be used to automatically runĮS modules when their syntax can be detected. Node v21.1.0 (Current) By Michaël Zasso,, Version 21.1.0 (Current), Notable Changes Automatically detect and run ESM syntax ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |