@leonardssh/rollup-plugin-swc
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

Logo

NPM version NPM downloads

Rollup plugin to compile bundles with the SWC.

Report Bug · Request Feature · What Is SWC?


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.

  1. Fork / Clone and select the main branch.
  2. Create a new branch in your fork.
  3. Make your changes.
  4. Commit your changes, and push them.
  5. Submit a Pull Request here!

📋 License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

Package Sidebar

Install

npm i @leonardssh/rollup-plugin-swc

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

8.43 kB

Total Files

6

Last publish

Collaborators

  • leonardssh