File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,9 @@ export const FlytrapTransformPlugin = createUnplugin(() => {
3434 return false
3535 } ,
3636 async transform ( code , id ) {
37- // if (id.includes('/node_modules/') || /* for dev purposes */ id.includes('flytrap-libs'))
38- if ( id . includes ( '/node_modules/' ) || id . includes ( 'flytrap-libs/dist' ) ) return
39- if ( code . includes ( '@flytrap-ignore' ) )
40- // if (id.includes('/node_modules/')) return
37+ if ( code . includes ( '@flytrap-ignore' ) || id . includes ( '/node_modules/' ) ) {
4138 return
42-
43- console . log ( 'Transforming file' , id )
44- /* if (id.includes('page.tsx')) {
45- console.log('Transformed: ')
46- } */
39+ }
4740
4841 const ss = new MagicString ( code )
4942 // add missing Flytrap imports
@@ -61,15 +54,10 @@ export const FlytrapTransformPlugin = createUnplugin(() => {
6154 } ) . toString ( )
6255 }
6356
64- /* if (id.includes('page.tsx')) {
65- console.log('page.tsx transformed')
66- console.log(flytrapTransform(ss.toString(), id.replace(pkgDirPath, '')).code)
67- } */
68-
6957 try {
7058 return flytrapTransform ( ss . toString ( ) , id . replace ( pkgDirPath , '' ) )
7159 } catch ( e ) {
72- console . warn ( 'Oops! Something went wrong while trasforming your code, error:' )
60+ console . warn ( 'Oops! Something went wrong while transforming your code, error:' )
7361 console . warn ( e )
7462 }
7563 }
You can’t perform that action at this time.
0 commit comments