Skip to content

Commit

Permalink
chore: remove cache-loader deprecated webpack plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Oct 12, 2023
1 parent 2b87eee commit d4250ea
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 62 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-hotels-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/scripts-config-react-webpack': patch
---

fix: remove deprecated cache-loader plugin
63 changes: 7 additions & 56 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ function getCommonStyleLoaders(enableModules, isEnvDevelopmentServe) {
];
}

function getJSAndTSLoader(env, useTypescript) {
function getJSAndTSLoader() {
return [
!env.nocache && { loader: 'cache-loader' },
{
loader: 'babel-loader',
options: getBabelLoaderOptions(babelConfig),
Expand Down Expand Up @@ -117,7 +116,7 @@ function getWebpackRules(srcDirectories, useTypescript, devMode) {
test: /\.(js|ts|tsx)$/,
exclude: /node_modules/,
include: srcDirectories,
use: getJSAndTSLoader(process.env, useTypescript),
use: getJSAndTSLoader(),
},
{
test: /\.css$/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ module.exports = ({ getUserConfig, mode }) => {
test: useTypescript ? /\.(js|ts|tsx)$/ : /\.js$/,
exclude: /node_modules/,
include: srcDirectories,
use: getJSAndTSLoader(env, useTypescript),
use: getJSAndTSLoader(),
},
{
test: /\.css$/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = options => {
{
test: useTypescript ? /\.(js|ts|tsx)$/ : /\.js$/,
exclude: /node_modules/,
use: getJSAndTSLoader(env, useTypescript),
use: getJSAndTSLoader(),
},
{
test: /\.scss$/,
Expand Down
1 change: 0 additions & 1 deletion tools/scripts-config-react-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@yarnpkg/lockfile": "^1.1.0",
"autoprefixer": "^10.4.15",
"babel-loader": "^9.1.3",
"cache-loader": "^4.1.0",
"circular-dependency-plugin": "^5.2.2",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.2.4",
Expand Down

0 comments on commit d4250ea

Please sign in to comment.