https://github.com/stefanpenner/broccoli-swc
Experimental SWC compiler for broccoli.
https://github.com/stefanpenner/broccoli-swc
broccoli broccoli-plugin ember ember-cli
Last synced: 10 months ago
JSON representation
Experimental SWC compiler for broccoli.
- Host: GitHub
- URL: https://github.com/stefanpenner/broccoli-swc
- Owner: stefanpenner
- Created: 2019-02-11T03:54:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-21T01:56:19.000Z (over 4 years ago)
- Last Synced: 2025-03-30T00:31:43.097Z (11 months ago)
- Topics: broccoli, broccoli-plugin, ember, ember-cli
- Language: JavaScript
- Homepage:
- Size: 77.1 KB
- Stars: 14
- Watchers: 4
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# broccoli-swc
[](https://travis-ci.org/stefanpenner/broccoli-swc)
Experimental SWC compiler for broccoli (mostly using this to explore SWC, and see what it still needs to be an option for us).
> Super-fast javascript to javascript compiler written in rust
TL;DR SWC is a alternative to babel / buble for the JS ecosystem.
* SWC Repo: https://github.com/swc-project/swc
* SWC Site: https://swc-project.github.io/
This module aims to experiment using SWC in the broccoli and ember-cli ecosystems.
## usage
### Basic via Brocfile.js or Broccoli pipeline
```js
// Brocfile.js
const swc = require('broccoli-swc');
module.exports = swc(__dirname + '/src', {
swc: {
module: {
type: 'commonjs' | 'amd'
moduleId: // optional or true, if true it will infer the module name from the file path.
}
}
}); // where src/**/*.js contains ecmascript
```
### Extension / Subclassing
```js
// Brocfile.js
const swc = require('broccoli-swc');
module.exports = class CustomSWC extends swc.Plugin {
// custom behavior
}
```
## SWC Issues:
https://github.com/stefanpenner/broccoli-swc/issues/9