Closed sebastiandottop closed 4 months ago
@castrogarciajs Hi, could you explain what different between two import methods
Hi @winchesHe, yes of course,
Since nodejs version 16
it is no longer recommended to call native modules by name
import path from 'path'
It is recommended to use the node:
prefix and it reduces the risk of a module present in node_modules overriding the newer imports.
It is also a more explicit protocol makes it more readable and also makes it clear that you are importing a built-in module. As there are many built-in modules, this extra information is useful for beginners or for someone who does not know some of them.
Resource where I learned what was explained: https://github.com/nodejs/node/issues/38343
import path from 'node:path'
I got thx~ @castrogarciajs
📝 Description
Hi team nextui,
In this pr I took the trosxuble to refactor the node module imports according to today's recommended imports
thanks for reading
✅ Type of change