Problem description
This is a test demo route, I want to implement less route configuration for demo writing, so I want to use this way to dynamically generate routes.
However, one thing I found in use was that the symbol could not be serialized when I first used reflect. ownKeys
So I just switched it and tried it, and there it was, and then there it was, and logged it and let’s see, two more properties
Keys is mainly used to iterate through the Object’s own enumerable properties, excluding properties inherited from the prototype and non-enumerable properties.
Reflects. ownKeys returns all its own property keys, whether or not enumerable, but not attributes inherited from the stereotype
Refelct.ownkeys ()
The Reflect.ownKeys
method returns an array of the target
object’s own property keys. Its return value is equivalent to Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))
.
So what does esModule have
So after compiling Babel, import and export will be polifill