A template for creating Obsidian plugins using Svelte and TypeScript.
This template provides a modern development environment for building Obsidian plugins:
Initial Setup (Required)
# Install dependencies
npm install
# Run the setup script to configure your plugin
npm run setup
The setup script will prompt you for:
This will automatically:
Development
npm run dev
This will:
Production Build
npm run build
This creates a production build of your plugin.
src/
- Source codemain.ts
- Plugin entry pointmodules/
- Plugin modules and componentspublic/
- Static filesmanifest.json
- Plugin manifest (auto-generated)dev-vault/
- Development vault for testingThis template includes automatic verification to ensure:
If you encounter errors about missing setup or mismatched names, run:
npm run setup
VS Code is recommended with the following extensions:
Due to the way Tailwind v4.x beta works, some Tailwind classes will work while others won't, particularly when trying to override default Obsidian styles. This is a known limitation and is being investigated for a potential fix.
Make sure the Hot-Reload plugin is active in your Obsidian vault. This plugin is required for the development hot-reloading functionality to work properly.
Restart Obsidian and try activating your plugin again. There are some temporary files that can cause issues with plugin activation.