SWC Transform to prefix logs. Useful for adding file and line number to logs
{
"jsc": {
"experimental": {
"plugins": [
["swc-plugin-console-prefix", { "prefixPattern": "hello", "ignore": ["info"] }]
]
}
}
}
// test.js
console.log('world')
$ npx swc ./test.js
// output
console.log('hello', 'world')
cargo run --package swc-plugin-console-source --example usage
cargo test -- --exact --nocapture
# dev
cargo build --target=wasm32-wasi
# release
cargo build --release --target=wasm32-wasi