mentaljam/rollup-plugin-swc(新しいタブで開きます)
主要言語: TypeScript
Rollup plugin to compile bundles with the SWC.
- star 数
- 74
- watcher 数
- 0
- fork 数
- 8
- issue 数
- 3
- 最終更新
- 2022/02/01
主要言語: TypeScript
Rollup plugin to compile bundles with the SWC.
Rollup plugin to compile bundles with the SWC.
npm i -D rollup-plugin-swc @swc/core
Note:
@swc/coreis a peer dependency
// rollup.config.js import swc from 'rollup-plugin-swc' export default { input: 'index.ts', output: { dir: 'dist', format: 'es', }, plugins: [ swc({ rollup: { exclude: 'path/to/exclude/', }, jsc: { parser: { syntax: 'typescript', }, target: 'es2018', }, }), ], }
The plugin takes all the SWC options except the filename.
In addition to the above SWC Options, it takes following options for smoother integration with the rollup plugin convention:
Type: String | Array[...String]
Default: null
A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. By default no files are ignored.
Type: String | Array[...String]
Default: null
A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
MIT © Petr Tsymbarovich