mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-01-09 21:46:56 -06:00
PR-579798: trying to fix Cypress component testing.
This commit is contained in:
parent
ab42b7ccc5
commit
5682277684
2
.github/workflows/npm-publish.yml
vendored
2
.github/workflows/npm-publish.yml
vendored
@ -37,8 +37,6 @@ jobs:
|
|||||||
# and run all Cypress tests
|
# and run all Cypress tests
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@v5 # use the explicit version number
|
uses: cypress-io/github-action@v5 # use the explicit version number
|
||||||
env:
|
|
||||||
ENV: production
|
|
||||||
with:
|
with:
|
||||||
component: true
|
component: true
|
||||||
publish-npm:
|
publish-npm:
|
||||||
|
2
.github/workflows/npm-test.yml
vendored
2
.github/workflows/npm-test.yml
vendored
@ -43,8 +43,6 @@ jobs:
|
|||||||
# and run all Cypress tests
|
# and run all Cypress tests
|
||||||
- name: Cypress run
|
- name: Cypress run
|
||||||
uses: cypress-io/github-action@v5 # use the explicit version number
|
uses: cypress-io/github-action@v5 # use the explicit version number
|
||||||
env:
|
|
||||||
ENV: production
|
|
||||||
with:
|
with:
|
||||||
component: true
|
component: true
|
||||||
test-build-package:
|
test-build-package:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import { config as envConfig } from './config';
|
||||||
import webpack from 'webpack';
|
import webpack from 'webpack';
|
||||||
import * as dotenv from 'dotenv';
|
|
||||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||||
@ -11,7 +11,6 @@ import ESLintPlugin from 'eslint-webpack-plugin';
|
|||||||
import CopyPlugin from 'copy-webpack-plugin';
|
import CopyPlugin from 'copy-webpack-plugin';
|
||||||
import { resolveTsAliases } from 'resolve-ts-aliases';
|
import { resolveTsAliases } from 'resolve-ts-aliases';
|
||||||
|
|
||||||
const dotEnvToParse = dotenv.config();
|
|
||||||
const alias = resolveTsAliases(path.resolve('tsconfig.json'));
|
const alias = resolveTsAliases(path.resolve('tsconfig.json'));
|
||||||
const copyPatterns: {from: string, to: string}[] = [];
|
const copyPatterns: {from: string, to: string}[] = [];
|
||||||
|
|
||||||
@ -40,10 +39,10 @@ export default {
|
|||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'index.css',
|
filename: 'index.css',
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env': JSON.stringify(dotEnvToParse.parsed),
|
|
||||||
}),
|
|
||||||
new ESLintPlugin(),
|
new ESLintPlugin(),
|
||||||
|
new webpack.EnvironmentPlugin({
|
||||||
|
...envConfig,
|
||||||
|
}),
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: copyPatterns
|
patterns: copyPatterns
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user