0.3.0 • Published 2 years ago

swc-plugin-console-prefix v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

swc-plugin-console-prefix

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')

Run example

cargo run --package swc-plugin-console-source --example usage

Test

cargo test  --  --exact --nocapture

Build

# dev
cargo build --target=wasm32-wasi

# release
cargo build --release --target=wasm32-wasi
0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago