spack can be configured with
spack.config.js. Config file for the spack is almost simillar to webpack. In future, I'll add a webpack-compatible plugin system.
Currently configuration items should be exported as common js exports, like
Note: In future, exporting config using ES modules will be supported.
If you want autocompletion or type checking for configuration, you can wrap with
config function from
@swc/core/spack. It's an identity function with type annotation.
Currently this value is not used, but it will behave similarly to one of webpack.
Determines the entry of bundling. You may specify a file or a map of bundle name to file path.
Note: Currently this should be absolute path. You can use
__dirnameto create one.
But in future, spack will support using relative path and will resolve files relative to
You can specify the name of bundle like following.
You can change destination directory of the bundler using
Used to control the behavior of swc. This field is optional.
See Options section of the swc doc for details.