This is a simple starter for Svelte in Adobe CEP using Webpack. Huge thanks to Koen Schmeets for helping out with Webpack.
manifest.xml and .debugThis clones the repo without the whole Git history.
npx degit Klustre/cep-svelte-starter my-svelte-panel
cd my-svelte-panel
npm install
npm start
Find the extension under Window > Extensions and start developing 👍
When running npm start, Webpack's dev server loads the files in memory instead of building to /dist. When you run npm run build it builds all files to /dist
On Windows you'll have to change:
export IS_DEV=1 to set IS_DEV=1sleep 5 to timeout 5Using any Svelte modules throws an error where the component is undefined. This is likely due to a double inclusion of svelte/internal.
Possible workarounds:
svelte/internalimport { createEventDispatcher } from 'svelte/internal'"postinstall": "rimraf node_modules/svelte/*.mjs"See https://github.com/sveltejs/svelte/issues/2896 and https://github.com/DeMoorJasper/parcel-plugin-svelte/issues/46#issuecomment-494556534
The bundler automatically:
manifest.xml and .debug files/dist folder to the current user's extensions folderdependencies to /dist/node_modules/public to /distLearn more at: Webpack and cep-bundler-webpack
panel.config.js & extendscript.config.js
See cep-bundler-core
When you open the project in VSCode it will prompt you to install the Svelte extension. This is the official Svelte language server which provides syntax highlighting and rich intellisense for Svelte components. To see the recommended extensions go to Extensions > Views and More Actions (…) > Show Recommended Extensions.