Quick Start

Module engineering solution not only provides a rich set of features, but also supports extending the capabilities of the current project by way of plugins.

We can quickly see how to write a module-tools plugin by using the following example.

First we create . /plugins/example.ts file under the initialized project.

Next add the code for the plugin to the example.ts file.

Then we register the plugin we just wrote via the plugins API.

Finally, run modern build and you will see.


. /project .
├── plugins
│ └── example.ts
├── src/
└── modern.config.ts

With the above example, we learned the following things.

  • The recommended plugin directory structure
  • The initialization code of the plugin
  • Plugin registration

In addition to the above, we also need to understand.