Skip to content

Commit 5f20c76

Browse files
wickedevclaude
andcommitted
refactor: remove SWC plugin and simplify architecture
- Remove unused SWC plugin (Rust code) - Clean up dependencies (@swc/core, unplugin-swc) - Simplify Vite plugin to use direct regex transformation - Keep only essential .proto import functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8397109 commit 5f20c76

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

packages/demo/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
"vite": "^4.4.0",
2424
"eslint": "^8.45.0",
2525
"@typescript-eslint/eslint-plugin": "^6.0.0",
26-
"@typescript-eslint/parser": "^6.0.0",
27-
"@swc/core": "^1.3.0",
28-
"unplugin-swc": "^1.4.0"
26+
"@typescript-eslint/parser": "^6.0.0"
2927
}
3028
}

packages/demo/vite-plugin-hallow.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Plugin } from 'vite';
2-
import { transformSync } from '@swc/core';
32
import path from 'path';
43
import fs from 'fs';
54

@@ -28,29 +27,7 @@ export function hallowPlugin(options: HallowPluginOptions = {}): Plugin {
2827
console.log(`🔄 Hallow Plugin: Processing ${id}`);
2928

3029
try {
31-
// Transform the code using SWC with our plugin
32-
const result = transformSync(code, {
33-
filename: id,
34-
jsc: {
35-
parser: {
36-
syntax: 'typescript',
37-
tsx: id.endsWith('.tsx'),
38-
decorators: true,
39-
},
40-
target: 'es2020',
41-
experimental: {
42-
plugins: [
43-
// For now, we'll do a simple string replacement
44-
// Later this will be replaced with the actual SWC plugin
45-
],
46-
},
47-
},
48-
module: {
49-
type: 'es6',
50-
},
51-
});
52-
53-
// Manual transformation for now (will be replaced by SWC plugin)
30+
// Transform .proto imports directly using regex replacement
5431
let transformedCode = code;
5532

5633
// Replace .proto imports with generated stub classes

0 commit comments

Comments
 (0)