PR-579798: trying to fix Cypress component testing.

This commit is contained in:
Alejandro Lembke Barrientos 2023-03-07 12:49:44 -06:00
parent ab42b7ccc5
commit 5682277684
3 changed files with 4 additions and 9 deletions

View File

@ -37,8 +37,6 @@ jobs:
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5 # use the explicit version number
env:
ENV: production
with:
component: true
publish-npm:

View File

@ -43,8 +43,6 @@ jobs:
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5 # use the explicit version number
env:
ENV: production
with:
component: true
test-build-package:

View File

@ -1,7 +1,7 @@
import path from 'path';
import fs from 'fs';
import { config as envConfig } from './config';
import webpack from 'webpack';
import * as dotenv from 'dotenv';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
@ -11,7 +11,6 @@ import ESLintPlugin from 'eslint-webpack-plugin';
import CopyPlugin from 'copy-webpack-plugin';
import { resolveTsAliases } from 'resolve-ts-aliases';
const dotEnvToParse = dotenv.config();
const alias = resolveTsAliases(path.resolve('tsconfig.json'));
const copyPatterns: {from: string, to: string}[] = [];
@ -40,10 +39,10 @@ export default {
new MiniCssExtractPlugin({
filename: 'index.css',
}),
new webpack.DefinePlugin({
'process.env': JSON.stringify(dotEnvToParse.parsed),
}),
new ESLintPlugin(),
new webpack.EnvironmentPlugin({
...envConfig,
}),
new CopyPlugin({
patterns: copyPatterns
}),