378 B18 lines
Blame
1import { transformJison } from '../.build/jisonTransformer.js';
2
3const fileRegex = /\.(jison)$/;
4
5export default function jison() {
6 return {
7 name: 'jison',
8 transform(src: string, id: string) {
9 if (fileRegex.test(id)) {
10 return {
11 code: transformJison(src),
12 map: null, // provide source map if available
13 };
14 }
15 },
16 };
17}
18