sst-sdk-nodejs wrapper for nuxt
- Wrapps around the Symplify Server-Side testing SDK.
- Exposes the sdk.
- Adds support for module wide config for nuxt3.
- Add
@sebbejohansson/sst-sdk-nuxt
dependency to your project
# Using pnpm
pnpm add -D @sebbejohansson/sst-sdk-nuxt
# Using yarn
yarn add --dev @sebbejohansson/sst-sdk-nuxt
# Using npm
npm install --save-dev @sebbejohansson/sst-sdk-nuxt
2a. (nuxt3) Add @sebbejohansson/sst-sdk-nuxt
to the modules
section of nuxt.config.ts
export default defineNuxtConfig({
modules: [
'@sebbejohansson/sst-sdk-nuxt'
],
/* SST SDK Config (only for nuxt3) */
sst: {
websiteId: '{insert your website id here}',
}
})
2b. (nuxt2) Add @sebbejohansson/sst-sdk-nuxt
to the buildModules
section of nuxt.config.ts
and add transpile for the sst-sdk-nodejs module.
export default {
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: ['@sebbejohansson/sst-sdk-nuxt'],
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
transpile: ['@symplify-conversion/sst-sdk-nodejs'],
},
}
(you can see an example here)
That's it! You can now use Symplify Server-Side Testing SDK for Nuxt in your Nuxt app ✨
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release