Installation
The Meteor Admin SDK (@shopware-ag/meteor-admin-sdk) can be installed and used in multiple ways depending on your project setup. This guide covers all installation methods and module formats.
NPM Installation
For projects using a build tool (webpack, Vite, Rollup, etc.), install the SDK via npm:Package Information
Package name:
Current version: 6.5.1
License: MIT
Repository: github.com/shopware/meteor
@shopware-ag/meteor-admin-sdkCurrent version: 6.5.1
License: MIT
Repository: github.com/shopware/meteor
Module Formats
The Admin SDK is distributed in multiple module formats to support different use cases:ES Modules (Recommended)
ES modules are the recommended format for modern JavaScript projects. They provide the best tree-shaking support, keeping your bundle size minimal.es/index.js
UMD Modules
UMD (Universal Module Definition) modules work in both Node.js and browser environments.umd/index.js
CDN Usage
For quick prototyping or simple projects without a build step, use the CDN version:sw variable:
Setup in Different Environments
Vanilla JavaScript
For a simple HTML/JavaScript setup:Modern JavaScript with Modules
TypeScript Projects
The SDK includes full TypeScript definitions:es/index.d.ts
Vue.js Projects
Example setup for Vue 3 applications:React Projects
Granular Imports
The SDK supports granular imports for specific modules, which can further reduce bundle size:Available Module Paths
Here are the main module paths available for granular imports:@shopware-ag/meteor-admin-sdk/es/channel- Communication channel@shopware-ag/meteor-admin-sdk/es/data- Data handling@shopware-ag/meteor-admin-sdk/es/data/Criteria- Query builder@shopware-ag/meteor-admin-sdk/es/data/repository- Repository pattern@shopware-ag/meteor-admin-sdk/es/data/composables- Vue 3 composables@shopware-ag/meteor-admin-sdk/es/location- Location utilities
Verification
To verify your installation is working correctly, try this simple test:Dependencies
The Admin SDK has minimal production dependencies:jwt-decode(^4.0.0) - For handling JWT tokenslocalforage(^1.10.0) - For local storage managementlodash-es(^4.17.21) - Utility functionssemver(^7.7.1) - Version comparison
Next Steps
Quickstart Tutorial
Build your first admin app with the SDK
Core Concepts
Learn about locations, iframes, and communication patterns
API Reference
Explore the complete API documentation
Example App
View a complete example application
Troubleshooting
Module not found errors
Module not found errors
If you see module resolution errors:
- Ensure the package is installed:
npm list @shopware-ag/meteor-admin-sdk - Clear your node_modules and reinstall:
rm -rf node_modules && npm install - Check your bundler configuration for proper ES module support
TypeScript type errors
TypeScript type errors
If TypeScript can’t find type definitions:
- Verify the package includes types:
es/index.d.tsshould exist - Ensure your
tsconfig.jsonhas"moduleResolution": "node" - Try restarting your TypeScript server
CDN version not loading
CDN version not loading
If the CDN version doesn’t work:
- Check your browser console for CORS errors
- Verify the CDN URL is correct and accessible
- Try using a specific version instead of latest
- Ensure your browser supports ES modules if using module imports