Change lazy function name to dynamic (#5)

* feat: add test:watch script

* feat: update lazy babel plugin to support 'dynamic' as function name

* feat: move 'lazy' into 'dynamic' function name to tuono main package

* feat: update version to v0.1.8
This commit is contained in:
Valerio Ageno
2024-06-21 18:52:58 +02:00
committed by GitHub
parent 54e7d3a397
commit 5d434aeb68
14 changed files with 59 additions and 28 deletions
@@ -2,10 +2,10 @@ import { it, expect, describe } from 'vitest'
import { LazyLoadingPlugin } from '../src'
const SOURCE_CODE = `
import { createRoute, lazy } from 'tuono'
import { createRoute, dynamic } from 'tuono'
const IndexImport = lazy(() => import('./../src/routes/index'))
const PokemonspokemonImport = lazy(
const IndexImport = dynamic(() => import('./../src/routes/index'))
const PokemonspokemonImport = dynamic(
() => import('./../src/routes/pokemons/[pokemon]'),
)
`