ts conversion

This commit is contained in:
Sidharth Vinod
2022-09-23 10:56:39 +05:30
parent f40f2a0b44
commit 8a489176c3
3 changed files with 5 additions and 3 deletions

17
.vite/jisonPlugin.ts Normal file
View File

@@ -0,0 +1,17 @@
import { transformJison } from './jisonTransformer.js';
const fileRegex = /\.(jison)$/;
export default function jison() {
return {
name: 'jison',
transform(src: string, id: string) {
if (fileRegex.test(id)) {
return {
code: transformJison(src),
map: null, // provide source map if available
};
}
},
};
}