0.1.1 • Published 2 years ago
unplugin-tanstack-router v0.1.1
unplugin-tanstack-router
Build plugin for route generation and file splitting built on unplugin.
Install
npm i unplugin-tanstack-router// vite.config.ts
import TanStackRouter from 'unplugin-tanstack-router/vite'
export default defineConfig({
plugins: [
TanStackRouter({ /* options */ }),
],
})// rollup.config.js
import TanStackRouter from 'unplugin-tanstack-router/rollup'
export default {
plugins: [
TanStackRouter({ /* options */ }),
],
}// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-tanstack-router/webpack')({ /* options */ })
]
}// nuxt.config.js
export default defineNuxtConfig({
modules: [
['unplugin-tanstack-router/nuxt', { /* options */ }],
],
})This module works for both Nuxt 2 and Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-tanstack-router/webpack')({ /* options */ }),
],
},
}// esbuild.config.js
import { build } from 'esbuild'
import TanStackRouter from 'unplugin-tanstack-router/esbuild'
build({
plugins: [TanStackRouter()],
})Development
To test your plugin, run: pnpm run dev
To release a new version, run: pnpm run release