Skip to content

Commit 71ab5f3

Browse files
committed
fix(templates): downgrade fork-ts-checker plugin version ⬇️
1 parent 921311f commit 71ab5f3

File tree

6 files changed

+34
-13880
lines changed

6 files changed

+34
-13880
lines changed

templates/app/config/webpack.config.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,18 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
2222
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
2323
const postcssNormalize = require('postcss-normalize');
2424
const WorkboxPlugin = require('workbox-webpack-plugin');
25-
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
25+
const BundleAnalyzerPlugin =
26+
require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
2627

2728
const babelConfig = require('../.babelrc.js');
2829

29-
module.exports = ({ NODE_ENV, SRC_DIR, BUILD_DIR, isEnvDevelopment = NODE_ENV === 'development', isEnvProduction = !isEnvDevelopment }) => ({
30+
module.exports = ({
31+
NODE_ENV,
32+
SRC_DIR,
33+
BUILD_DIR,
34+
isEnvDevelopment = NODE_ENV === 'development',
35+
isEnvProduction = !isEnvDevelopment,
36+
}) => ({
3037
mode: isEnvDevelopment ? 'development' : 'production',
3138
// Stop compilation early in production
3239
bail: isEnvProduction,
@@ -45,13 +52,17 @@ module.exports = ({ NODE_ENV, SRC_DIR, BUILD_DIR, isEnvDevelopment = NODE_ENV ==
4552
path: BUILD_DIR,
4653
filename: isEnvDevelopment ? '[name].js' : '[name].[contenthash:8].js',
4754
// There are also additional JS chunk files if you use code splitting.
48-
chunkFilename: isEnvDevelopment ? '[name].chunk.js' : '[name].[chunkhash:8].chunk.js',
55+
chunkFilename: isEnvDevelopment
56+
? '[name].chunk.js'
57+
: '[name].[chunkhash:8].chunk.js',
4958
// https://webpack.js.org/configuration/output/#outputpublicpath
5059
// publicPath: ''
5160
// Point sourcemap entries to original disk location (format as URL on Windows)
5261
devtoolModuleFilenameTemplate: isEnvProduction
53-
? (info) => path.relative(SRC_DIR, info.absoluteResourcePath).replace(/\\/g, '/')
54-
: isEnvDevelopment && ((info) => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
62+
? (info) =>
63+
path.relative(SRC_DIR, info.absoluteResourcePath).replace(/\\/g, '/')
64+
: isEnvDevelopment &&
65+
((info) => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
5566
// this defaults to 'window', but by setting it to 'this' then
5667
// module chunks which are built will work in web workers as well.
5768
globalObject: 'this',

templates/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"eslint": "^8.14.0",
4848
"eslint-formatter-pretty": "^4.1.0",
4949
"eslint-plugin-compat": "^4.0.2",
50-
"fork-ts-checker-webpack-plugin": "^7.2.8",
50+
"fork-ts-checker-webpack-plugin": "^6.5.2",
5151
"html-loader": "^3.1.0",
5252
"html-webpack-plugin": "^5.5.0",
5353
"husky": "^7.0.4",

templates/react-app/config/webpack.config.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
2323
const postcssNormalize = require('postcss-normalize');
2424
const HtmlWebpackPlugin = require('html-webpack-plugin');
2525
const WorkboxPlugin = require('workbox-webpack-plugin');
26-
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
26+
const BundleAnalyzerPlugin =
27+
require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
2728

2829
const babelConfig = require('../.babelrc.js');
2930

30-
module.exports = ({ NODE_ENV, SRC_DIR, BUILD_DIR, isEnvDevelopment = NODE_ENV === 'development', isEnvProduction = !isEnvDevelopment }) => ({
31+
module.exports = ({
32+
NODE_ENV,
33+
SRC_DIR,
34+
BUILD_DIR,
35+
isEnvDevelopment = NODE_ENV === 'development',
36+
isEnvProduction = !isEnvDevelopment,
37+
}) => ({
3138
mode: isEnvDevelopment ? 'development' : 'production',
3239
// Stop compilation early in production
3340
bail: isEnvProduction,
@@ -46,13 +53,17 @@ module.exports = ({ NODE_ENV, SRC_DIR, BUILD_DIR, isEnvDevelopment = NODE_ENV ==
4653
path: BUILD_DIR,
4754
filename: isEnvDevelopment ? '[name].js' : '[name].[contenthash:8].js',
4855
// There are also additional JS chunk files if you use code splitting.
49-
chunkFilename: isEnvDevelopment ? '[name].chunk.js' : '[name].[chunkhash:8].chunk.js',
56+
chunkFilename: isEnvDevelopment
57+
? '[name].chunk.js'
58+
: '[name].[chunkhash:8].chunk.js',
5059
// https://webpack.js.org/configuration/output/#outputpublicpath
5160
// publicPath: ''
5261
// Point sourcemap entries to original disk location (format as URL on Windows)
5362
devtoolModuleFilenameTemplate: isEnvProduction
54-
? (info) => path.relative(SRC_DIR, info.absoluteResourcePath).replace(/\\/g, '/')
55-
: isEnvDevelopment && ((info) => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
63+
? (info) =>
64+
path.relative(SRC_DIR, info.absoluteResourcePath).replace(/\\/g, '/')
65+
: isEnvDevelopment &&
66+
((info) => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
5667
// this defaults to 'window', but by setting it to 'this' then
5768
// module chunks which are built will work in web workers as well.
5869
globalObject: 'this',

0 commit comments

Comments
 (0)