Skip to content

Commit

Permalink
Open in same browser tab
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwestenra committed Jul 30, 2020
1 parent ee9fd1f commit dd7f94e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test-lib/react-app/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "Test installing and importing the Kedro-Viz JS package into another React App",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --open",
"start": "webpack-dev-server",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
Expand Down
4 changes: 4 additions & 0 deletions tools/test-lib/react-app/webpack.config.js
@@ -1,3 +1,4 @@
const openBrowser = require('react-dev-utils/openBrowser');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
Expand All @@ -7,6 +8,9 @@ module.exports = {
entry: './index.js',
devtool: 'inline-source-map',
devServer: {
after: () => {
openBrowser && openBrowser('http://localhost:1337');
},
contentBase: path.join(__dirname, 'dist'),
port: 1337
},
Expand Down

0 comments on commit dd7f94e

Please sign in to comment.