diff --git a/src/core/build/createWebpackConfig.ts b/src/core/build/createWebpackConfig.ts index e14cb250a..7e1561234 100644 --- a/src/core/build/createWebpackConfig.ts +++ b/src/core/build/createWebpackConfig.ts @@ -407,29 +407,42 @@ export default function createWebpackConfig({ /* Webpack config for our embed */ { ...baseConfig, - entry: [ - // No polyfills for the embed. - (isProduction && "") || - require.resolve("react-dev-utils/webpackHotDevClient"), - paths.appEmbedIndex, - // Remove deactivated entries. - ].filter(s => s), + entry: { + embed: [ + paths.appEmbedIndex, + (isProduction && "") || + require.resolve("react-dev-utils/webpackHotDevClient"), + ], + auth: [ + paths.appAuthIndex, + (isProduction && "") || + require.resolve("react-dev-utils/webpackHotDevClient"), + ], + }, output: { ...baseConfig.output, library: "Talk", // don't hash the embed, cache-busting must be completed by the requester // as this lives in a static template on the embed site. - filename: "assets/js/embed.js", + filename: "assets/js/[name].js", }, plugins: [ ...baseConfig.plugins!, // Generates an `stream.html` file with the