Temporarily ignore type errors from EnvironmentPlugin since type matching is currently too strict

(cherry picked from commit 7dea5f7d98)
This commit is contained in:
Alexandre Vryghem
2024-08-30 20:49:38 +02:00
committed by github-actions[bot]
parent ea3970cfb5
commit 4e05a5c310
2 changed files with 9 additions and 7 deletions

View File

@@ -79,6 +79,7 @@ const SCSS_LOADERS = [
export const commonExports = {
plugins: [
// @ts-expect-error: EnvironmentPlugin constructor types are currently to strict see issue https://github.com/webpack/webpack/issues/18719
new EnvironmentPlugin({
languageHashes: getFileHashes(path.join(__dirname, '..', 'src', 'assets', 'i18n'), /.*\.json5/g),
}),

View File

@@ -1,16 +1,17 @@
import { commonExports } from './webpack.common';
import { projectRoot } from './helpers';
import { EnvironmentPlugin } from 'webpack';
const webpack = require('webpack');
import { projectRoot } from './helpers';
import { commonExports } from './webpack.common';
module.exports = Object.assign({}, commonExports, {
plugins: [
...commonExports.plugins,
new webpack.EnvironmentPlugin({
// @ts-expect-error: EnvironmentPlugin constructor types are currently to strict see issue https://github.com/webpack/webpack/issues/18719
new EnvironmentPlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
AOT: true
}
NODE_ENV: 'production',
AOT: true,
},
}),
],
mode: 'production',