From 051adfb281322d87389701118f9d65f57d3d0b14 Mon Sep 17 00:00:00 2001 From: Dan Grebb Date: Wed, 17 Jan 2024 18:17:16 -0500 Subject: [PATCH] chore: update webpack-dev-server config/script (garris#1519) --- compare/webpack.config.js | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/compare/webpack.config.js b/compare/webpack.config.js index c2ddc2161..8860ab959 100644 --- a/compare/webpack.config.js +++ b/compare/webpack.config.js @@ -3,6 +3,20 @@ const path = require('path'); module.exports = { mode: 'production', entry: path.join(__dirname, 'src', 'index.js'), + devServer: { + static: [ + { + directory: path.resolve(__dirname, 'output'), + serveIndex: true + }, { + directory: path.join(__dirname, '../test/configs/backstop_data/html_report'), + publicPath: '/' + }, { + directory: path.join(__dirname, '../test/configs/backstop_data'), + publicPath: '/' + } + ] + }, output: { path: path.resolve(__dirname, 'output'), filename: 'index_bundle.js' diff --git a/package.json b/package.json index b0fbde326..61e58fff4 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "unit-test": "mocha --reporter spec --recursive \"test/**/*_spec.js\" && npm run -s success-message || npm run -s fail-message", "precommit": "lint-staged", "build-compare": "cp ./node_modules/diverged/src/diverged.js ./compare/output/ && cp ./node_modules/diff/dist/diff.js ./compare/output/ && webpack --config ./compare/webpack.config.js && npm run -s lint", - "dev-compare": "webpack-dev-server --content-base ./compare/output --config ./compare/webpack.config.js", + "dev-compare": "webpack-dev-server --config ./compare/webpack.config.js", "integration-test": "rm -rf integrationTestDir && mkdir integrationTestDir && cd integrationTestDir && node ../cli/index.js init && node ../cli/index.js reference && node ../cli/index.js test && node -e \"require('../')('test')\" && npm --prefix ../ run -s success-message || npm --prefix ../ run -s fail-message", "smoke-test": "cd test/configs/ && node ../../cli/index.js test --config=backstop_features && npm --prefix ../../ run -s success-message || npm --prefix ../../ run -s caution-message", "smoke-test-playwright": "cd test/configs/ && node ../../cli/index.js test --config=backstop_features_pw && npm --prefix ../../ run -s fail-message || npm --prefix ../../ run -s caution-message",