Skip to content

Commit affee30

Browse files
feat: Drop legacy webpack v4 support (#5507)
1 parent 57786ab commit affee30

File tree

11 files changed

+14
-46
lines changed

11 files changed

+14
-46
lines changed

docs/react/guides/migrating-to-v5.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ Custom loggers were already deprecated in 4 and have been removed in this versio
177177

178178
We have updated our browserslist to produce a more modern, performant and smaller bundle. You can read about the requirements [here](../installation#requirements).
179179

180+
### Supported Bundlers
181+
182+
We have removed the legacy `.esm.js` output, which was used by bundlers which didn't recognise the modern `.mjs` extension such as Webpack v4. If you are still using Webpack v4, you can continue to use TanStack Query v4, or upgrade to Webpack v5 or another bundler.
183+
180184
### Private class fields and methods
181185

182186
TanStack Query has always had private fields and methods on classes, but they weren't really private - they were just private in `TypeScript`. We now use [ECMAScript Private class features](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields), which means those fields are now truly private and can't be accessed from the outside at runtime.

packages/query-async-storage-persister/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/query-broadcast-client-experimental/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/query-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/query-persist-client-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/query-sync-storage-persister/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/react-query-devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/react-query-persist-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/react-query/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"type": "commonjs",
1414
"types": "build/lib/index.d.ts",
1515
"main": "build/lib/index.js",
16-
"module": "build/lib/index.esm.js",
16+
"module": "build/lib/index.mjs",
1717
"exports": {
1818
".": {
1919
"types": "./build/lib/index.d.ts",

packages/vue-query/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"type": "commonjs",
1818
"types": "build/lib/index.d.ts",
1919
"main": "build/lib/index.js",
20-
"module": "build/lib/index.esm.js",
20+
"module": "build/lib/index.mjs",
2121
"exports": {
2222
".": {
2323
"types": "./build/lib/index.d.ts",

0 commit comments

Comments
 (0)