Skip to content

Commit 49b7b5b

Browse files
committed
chore: daily development
1 parent cc907b9 commit 49b7b5b

File tree

5 files changed

+17
-38
lines changed

5 files changed

+17
-38
lines changed

playground/swc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.swcrc

playground/swc/.swcrc

Lines changed: 0 additions & 24 deletions
This file was deleted.

playground/swc/.swcrc.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

playground/swc/generate-swcrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const path = require('path')
2+
const { writeFileSync } = require('fs')
3+
const wasmPath = path.resolve(__dirname, '..', '..', 'target', 'wasm32-wasip1', 'debug', 'swc_plugin_coverage.wasm')
4+
5+
const config = {
6+
$schema: 'https://json.schemastore.org/swcrc',
7+
jsc: {
8+
experimental: {
9+
plugins: [[wasmPath, {}]],
10+
},
11+
},
12+
}
13+
14+
const configStr = JSON.stringify(config, null, 2)
15+
writeFileSync(path.join(__dirname, '.swcrc'), configStr)

playground/swc/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7+
"pretest": "node generate-swcrc.js",
78
"test": "swc ./src -d dist"
89
},
910
"keywords": [],

0 commit comments

Comments
 (0)