modular-template-package
v2.0.0
Published
This is a [Modular Package](https://modular.js.org/package-types/package)
Downloads
9
Readme
PackageName__
This is a Modular Package
Build
To build your package for deployment, run:
modular build PackageName__
When building a package
, Modular transpiles it starting from its entry-point
twice: once with a target format of
CommonJS in the dist-cjs
directory and
once with a target format of
ES Modules,
in the dist-es
directory. The output package.json
links both compiled
entry-points respectively in the
main
and
module
field.
Start
Modular package
is a generic type that doesn't necessarily export an UI
Component; for this reason, it can't be previewed locally, and the
start
command fails when invoked
on a package. For a similar type that can be started, see view
.
Entry-point
The entry-point for a package is configurable; Modular discovers it by looking
at the main
field in the package's package.json
; by default,
modular add
ing a new package sets it as "./src/index.ts"
, but it's possible
to manually modify it.
Template
Packages are generated by modular add
using the
modular-template-package
template.