Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CCI] Fix deprecated webpack configuration #578

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
};