diff --git a/src/client/dialog-demo-bootstrap/index.html b/src/client/dialog-demo-bootstrap/index.html index 2b7fdfe..6f8b62d 100644 --- a/src/client/dialog-demo-bootstrap/index.html +++ b/src/client/dialog-demo-bootstrap/index.html @@ -3,6 +3,12 @@ + + + { console.log('Waiting for Webpack Dev Server to finish loading...'); return new Promise((resolve) => { process.stdout.on('data', (data) => { - if (data.includes('DEVELOPMENT: CLIENT - Dialog Demo Bootstrap')) { + if (data.includes('CLIENT - Dialog Demo Bootstrap')) { resolve(); } }); @@ -56,12 +56,13 @@ describe(`Local setup ${isExtended ? '*extended*' : ''}`, () => { if (isExtended) { await openAddon(page); } else { - await page.goto('https://localhost:3000/dialog-demo-bootstrap.html'); + await page.goto('https://localhost:3000/dialog-demo-bootstrap-impl.html'); await page.waitForTimeout(3000); } }); afterAll(() => { + console.log('Closing process.'); process.kill(); }); diff --git a/webpack.config.js b/webpack.config.js index ce84d1e..3d7b946 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,6 +25,8 @@ envVars.NODE_ENV = process.env.NODE_ENV; envVars.PORT = PORT; const isProd = process.env.NODE_ENV === 'production'; +const isWebpackServe = process.env.WEBPACK_SERVE === 'true'; + const publicPath = process.env.ASSET_PATH || '/'; /********************************* @@ -387,10 +389,11 @@ module.exports = [ // 2. Set up webpack dev server during development // Note: devServer settings are only read in the first element when module.exports is an array { ...copyFilesConfig, ...(isProd ? {} : { devServer }) }, - // 3. Create the server bundle - serverConfig, + // 3. Create the server bundle. Don't serve server bundle when running webpack serve. + !isWebpackServe && serverConfig, // 4. Create one client bundle for each client entrypoint. ...clientConfigs, - // 5. Create a development dialog bundle for each client entrypoint during development. - ...(isProd ? [] : devClientConfigs), -]; + // 5. Create a development dialog wrapper bundle for each client entrypoint during development. + // Don't actually serve it though when running webpack serve. + ...(isProd || isWebpackServe ? [] : devClientConfigs), +].filter(Boolean);