Blog>
Snippets

Installing TanStack Config in a Project

Demonstrate how to install TanStack Config via npm or yarn and initialize it in a JavaScript project.
npm install @tanstack/config-vue
This command installs TanStack Config for a Vue project using npm. Replace 'vue' with 'react', 'svelte', or another framework as needed.
import { createConfig } from '@tanstack/config-vue';

const config = createConfig({
  // Define your configuration options here
});

export default config;
After installation, import the 'createConfig' function from the installed package and use it to initialize your project's configuration. This example is tailored for Vue; adjust the import for your specific framework.