From 2fb3ab2e8fadcc8498ca7b630b9bb218c76e9a58 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Wed, 8 Aug 2018 11:42:09 -0300 Subject: [PATCH] Adding target config for auth --- src/core/build/createWebpackConfig.ts | 66 ++++++++++++++++++--------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/src/core/build/createWebpackConfig.ts b/src/core/build/createWebpackConfig.ts index 7e1561234..60bb6cbec 100644 --- a/src/core/build/createWebpackConfig.ts +++ b/src/core/build/createWebpackConfig.ts @@ -407,42 +407,29 @@ export default function createWebpackConfig({ /* Webpack config for our embed */ { ...baseConfig, - entry: { - embed: [ - paths.appEmbedIndex, - (isProduction && "") || - require.resolve("react-dev-utils/webpackHotDevClient"), - ], - auth: [ - paths.appAuthIndex, - (isProduction && "") || - require.resolve("react-dev-utils/webpackHotDevClient"), - ], - }, + entry: [ + // No polyfills for the embed. + (isProduction && "") || + require.resolve("react-dev-utils/webpackHotDevClient"), + paths.appEmbedIndex, + // Remove deactivated entries. + ].filter(s => s), 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/[name].js", + filename: "assets/js/embed.js", }, plugins: [ ...baseConfig.plugins!, // Generates an `stream.html` file with the