Home > @lynx-js/rspeedy > Source > alias
Create aliases to import
or require
certain modules more easily.
Signature:
A trailing $
can also be added to the given object's keys to signify an exact match:
which would yield these results:
source.alias
is useful to control how a npm package is resolved.
react
to @lynx-js/react
:This allows you to use some third-party libraries that directly uses react
as dependencies in ReactLynx.
dayjs
:Please note that this is dangerous, since all the dayjs
(including the dependencies of a dependencies) is resolved to the version in the project. It may cause both compile-time and runtime errors due to version mismatch.
Setting source.alias
to false
will ignore a module.