@leonardssh/rollup-plugin-swc
v0.1.7
Published
Rollup plugin to compile bundles with the SWC.
Downloads
12
Readme
Remember to 🌟 this Github if you 💖 it.
📦 Installation
- 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
🤓 Usage
// 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'
}
})
]
};
🛠️ Options
The plugin takes all the SWC options except the filename
.
👨💻 Contributing
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!
📋 License
This project is licensed under the MIT License - see the LICENSE file for details.