Skip to content

Commit efd32f0

Browse files
authored
chore(nextjs): Remove obsolete dataFetchers loader (#5713)
This removes the dataFetchers loader and its associated files and dependencies, now that it's been supplanted by the proxy loader. It also changes the build config slightly - somehow, the presence of everything this PR deletes made it so the loaders files output themselves where we want them, even without the entryFileNames setting they ought to have needed. Alas, doing the deletions broke the spell, and now they won't build to the right place without entryFileNames, so this adds it. (Even though we've now reverted to what logically should be true, I'm still baffled, because what on earth was happening before?) Note: Until we fully settle the CJS questions, I'm leaving isESM.ts in the SDK, even though after this change it will be (for the moment) unused.
1 parent 50c84c6 commit efd32f0

File tree

9 files changed

+10
-1351
lines changed

9 files changed

+10
-1351
lines changed

packages/nextjs/package.json

-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"access": "public"
1818
},
1919
"dependencies": {
20-
"@babel/parser": "^7.18.10",
2120
"@rollup/plugin-sucrase": "4.0.4",
2221
"@sentry/core": "7.12.1",
2322
"@sentry/hub": "7.12.1",
@@ -29,14 +28,11 @@
2928
"@sentry/utils": "7.12.1",
3029
"@sentry/webpack-plugin": "1.19.0",
3130
"chalk": "3.0.0",
32-
"jscodeshift": "^0.13.1",
3331
"rollup": "2.78.0",
3432
"tslib": "^1.9.3"
3533
},
3634
"devDependencies": {
37-
"@babel/types": "7.18.10",
3835
"@sentry/nextjs": "7.12.1",
39-
"@types/jscodeshift": "^0.11.5",
4036
"@types/webpack": "^4.41.31",
4137
"next": "10.1.3"
4238
},

packages/nextjs/rollup.npm.config.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ export default [
1414
),
1515
...makeNPMConfigVariants(
1616
makeBaseNPMConfig({
17-
entrypoints: [
18-
'src/config/templates/prefixLoaderTemplate.ts',
19-
'src/config/templates/proxyLoaderTemplate.ts',
20-
'src/config/templates/dataFetchersLoaderTemplate.ts',
21-
],
17+
entrypoints: ['src/config/templates/prefixLoaderTemplate.ts', 'src/config/templates/proxyLoaderTemplate.ts'],
2218

2319
packageSpecificConfig: {
2420
plugins: [plugins.makeRemoveMultiLineCommentsPlugin()],
2521
output: {
26-
// Preserve the original file structure (i.e., so that everything is still relative to `src`). (Not entirely
27-
// clear why this is necessary here and not for other entrypoints in this file.)
22+
// Preserve the original file structure (i.e., so that everything is still relative to `src`)
2823
entryFileNames: 'config/templates/[name].js',
2924

3025
// this is going to be add-on code, so it doesn't need the trappings of a full module (and in fact actively
@@ -47,6 +42,9 @@ export default [
4742

4843
packageSpecificConfig: {
4944
output: {
45+
// Preserve the original file structure (i.e., so that everything is still relative to `src`)
46+
entryFileNames: 'config/loaders/[name].js',
47+
5048
// make it so Rollup calms down about the fact that we're combining default and named exports
5149
exports: 'named',
5250
},

packages/nextjs/src/config/loaders/ast.ts

-527
This file was deleted.

packages/nextjs/src/config/loaders/dataFetchersLoader.ts

-223
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export { default as prefixLoader } from './prefixLoader';
2-
export { default as dataFetchersLoader } from './dataFetchersLoader';
32
export { default as proxyLoader } from './proxyLoader';

packages/nextjs/src/config/loaders/parser.ts

-49
This file was deleted.

packages/nextjs/src/config/templates/dataFetchersLoaderTemplate.ts

-30
This file was deleted.

0 commit comments

Comments
 (0)