@@ -3,7 +3,7 @@ import type { Path } from "@effect/platform/Path"
33import { Effect , pipe } from "effect"
44import type { PluginOption } from "vite"
55
6- import { componentPathAttributeName , isJsxFile , normalizeModuleId } from "../core/component-path.js"
6+ import { babelPluginName , componentPathAttributeName , isJsxFile , normalizeModuleId } from "../core/component-path.js"
77import { createJsxTaggerVisitor , type JsxTaggerContext } from "../core/jsx-tagger.js"
88import { NodePathLayer , relativeFromRoot } from "../core/path-service.js"
99
@@ -56,16 +56,12 @@ const toViteResult = (result: BabelTransformResult): ViteTransformResult | null
5656// EFFECT: Babel AST transformation
5757// INVARIANT: each JSX opening element has at most one path attribute
5858// COMPLEXITY: O(n)/O(1), n = number of JSX elements
59- type ViteBabelState = {
60- readonly context : JsxTaggerContext
61- }
62-
63- const makeBabelTagger = ( relativeFilename : string , attributeName : string ) : PluginObj < ViteBabelState > => {
59+ const makeBabelTagger = ( relativeFilename : string , attributeName : string ) : PluginObj => {
6460 const context : JsxTaggerContext = { relativeFilename, attributeName }
6561
6662 return {
67- name : "component-path-babel-tagger" ,
68- visitor : createJsxTaggerVisitor < ViteBabelState > (
63+ name : babelPluginName ,
64+ visitor : createJsxTaggerVisitor (
6965 ( ) => context ,
7066 t
7167 )
0 commit comments