Skip to content

Commit

Permalink
Fix deprecated webpack configuration (#577) (#578)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Myssak <[email protected]>
(cherry picked from commit f936098)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Mar 10, 2023
1 parent 8680540 commit 872c3c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src-docs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const webpackConfig = {
rules: [
{
test: /\.(js|tsx?)$/,
loaders: employCache([
use: employCache([
{
loader: 'babel-loader',
options: { babelrc: false, ...babelConfig },
Expand All @@ -83,7 +83,7 @@ const webpackConfig = {
},
{
test: /\.scss$/,
loaders: employCache([
use: employCache([
{
loader: 'style-loader',
options: { injectType: 'lazySingletonStyleTag' },
Expand All @@ -96,7 +96,7 @@ const webpackConfig = {
},
{
test: /\.css$/,
loaders: employCache(['style-loader', 'css-loader']),
use: employCache(['style-loader', 'css-loader']),
exclude: /node_modules/,
},
{
Expand Down
12 changes: 4 additions & 8 deletions src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const isProduction = process.env.NODE_ENV === 'production';

const plugins = [
new webpack.NoEmitOnErrorsPlugin(),
new CircularDependencyPlugin({
exclude: /node_modules/,
failOnError: true,
Expand Down Expand Up @@ -98,12 +97,7 @@ module.exports = {
},
{
test: /\.scss$/,
loaders: [
'style-loader',
'css-loader',
'postcss-loader',
'sass-loader',
],
use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
exclude: /node_modules/,
},
{
Expand All @@ -117,6 +111,8 @@ module.exports = {
plugins,

optimization: {
minimizer: isProduction ? [terserPlugin] : [],
minimize: isProduction,
minimizer: [terserPlugin],
noEmitOnErrors: true,
},
};

0 comments on commit 872c3c5

Please sign in to comment.