feat: Use CJS build for SDK (#10247)

The UMD build was causing issues for a few customers, this PR reverts to
using CJS like used in Webpack 4 before the vite migration

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
Shivam Mishra
2024-10-09 14:09:52 +05:30
committed by GitHub
parent 42eca69763
commit aa5fa0c758

View File

@@ -66,7 +66,7 @@ export default defineConfig({
lib: isLibraryMode
? {
entry: path.resolve(__dirname, './app/javascript/entrypoints/sdk.js'),
formats: ['umd'], // UMD format for single file
formats: ['cjs'], // CJS format for single file
name: 'sdk',
}
: undefined,