Embeddable now supports componentsSrc
and modelsSrc
folders outside src/
SDK version:
“@embeddable.com/sdk-core”: “^3.1.8”
To configure components
and models
folders outside src, you can set this in config.js
like so:
export default defineConfig({ plugins: [react] componentsSrc: ‘./src’, modelsSrc: ‘./src’,
Note: these fields are optional. When not defined, ./src
folder path will be used by default, and cube models will be looked up in this folder recursively.
Importantly: once components and models are pushed to Embeddable (using npm run embeddable:push
) we do actually separate them, and only the components will be rendered on the client-side. The models are only ever used by the server-side of Embeddable (to generate the SQL) and are never included in any code that is available to the browser.
When embedding, it is important that retrieval of the security token is done on the BE, as you never want to expose your API Key to the FE.