Rollup plugin to compile bundles with the SWC.
Report Bug
·
Request Feature
·
What Is SWC?
Remember to 🌟 this Github if you 💖 it.
- Using yarn:
yarn add -D @leonardssh/rollup-plugin-swc @swc/core
- Using npm:
npm i --save-dev @leonardssh/rollup-plugin-swc @swc/core
- Using pnpm:
pnpm add -D @leonardssh/rollup-plugin-swc @swc/core
// rollup.config.js
import { swcPlugin } from '@leonardssh/rollup-plugin-swc';
export default {
input: 'index.ts',
output: {
dir: 'dist',
format: 'es'
},
plugins: [
swcPlugin({
jsc: {
parser: {
syntax: 'typescript'
},
target: 'es2018'
}
})
]
};
The plugin takes all the SWC options except the filename
.
To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.
- Fork / Clone and select the
main
branch. - Create a new branch in your fork.
- Make your changes.
- Commit your changes, and push them.
- Submit a Pull Request here!
This project is licensed under the MIT License - see the LICENSE file for details.