Inspired by babel-plugin-ignore-import
, and since I needed this functionality it was a blocker to moving fully utilizing SWC.
import { transformSync } from "@swc/core";
const output = transformSync(input, {
jsc: {
experimental: {
plugins: [
[
"swc-plugin-ignore-import",
{
pattern: ".scss$",
}
]
],
},
},
});
cargo fmt
First make sure that the correct Wasm target for Rust compiler is being installed:
rustup target add wasm32-wasip1
Node.js usage tests are written in usage.test.js
and can be executed:
cargo build-wasi
npm install
npm test
The same approach is used at GitHub Actions, defined in .github/workflows/build-and-test.yml
.
Licensed under the MIT license.
Copyright (c) Juga Paazmaya [email protected]