diff --git a/.circleci/config.yml b/.circleci/config.yml index 27bf993..0948946 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,6 +41,7 @@ templates: - run: mkdir -p /tmp/artifacts/logs - run: npm run build + - run: npm run profiling-build - run: npm run lint - run: npm run lint-styles - run: DOCKER_HOST=localhost npm test diff --git a/config/webpack.profiling.config.js b/config/webpack.profiling.config.js new file mode 100644 index 0000000..84c4da2 --- /dev/null +++ b/config/webpack.profiling.config.js @@ -0,0 +1,20 @@ +const webpackProdConfig = require('./webpack.production.config'); +const artifacts = require("../test/artifacts"); + +const OUTPATH = artifacts.pathSync("/profiling"); + +module.exports = { + ...webpackProdConfig, + output: { + ...webpackProdConfig.output, + path: OUTPATH, + }, + resolve: { + ...webpackProdConfig.resolve, + alias: { + ...webpackProdConfig.resolve.alias, + 'react-dom$': 'react-dom/profiling', + 'scheduler/tracing': 'scheduler/tracing-profiling', + } + } +}; diff --git a/package.json b/package.json index b7d9a6b..1e6045f 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "stats": "webpack --config config/webpack.production.config.js --profile --json > stats.json", "build": "webpack --config config/webpack.production.config.js --progress --profile --colors", + "profiling-build": "webpack --config config/webpack.profiling.config.js --progress --profile --colors", "test": "cross-env NODE_ENV=test wdio config/wdio.conf.js", "test-watch": "cross-env NODE_ENV=test wdio config/wdio.conf.js --watch", "start": "webpack-dev-server --progress --profile --colors --config config/webpack.config.js",