Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

[Bug] Plugin picks up sourcemaps as pages #296

Open
jariz opened this issue Jul 13, 2020 · 4 comments
Open

[Bug] Plugin picks up sourcemaps as pages #296

jariz opened this issue Jul 13, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@jariz
Copy link
Contributor

jariz commented Jul 13, 2020

Issue

Expected Behavior

The plugin only looks for .next/serverless/pages/*.js files.

Actual Behavior

The plugin picks up every file in .next/serverless/pages, including *.js.map files.

Steps to Reproduce the Problem

Simply running a build with the latest version of next should suffice.
I do have a few custom settings in my webpack config but none of them have to do with sourcemapping, which as far as I know is enabled by default in nextjs.

Specifications

  • Version: 3.0.0
  • Platform: Darwin
  • Subsystem: n/a
@ematipico ematipico added the bug Something isn't working label Jul 14, 2020
@ematipico
Copy link
Owner

Hi @jariz , thank you for reporting this. Did you use some kind of plugin? As far as I know Next.js doesn't emit source maps for the server code.

@jariz
Copy link
Contributor Author

jariz commented Jul 14, 2020

Fair enough, I'll try reproducing this from a 'fresh' nextJS instance, will let you know.

@jariz
Copy link
Contributor Author

jariz commented Jul 14, 2020

So I looked into this a bit more, and yes, the cause of this is a plugin after all:
https://github.com/vercel/next-plugins/tree/master/packages/next-source-maps

I guess the sourcemaps aren't really needed for the serverside rendered pages, but it's kind of a hard thing to turn off conditionally from the webpack config.
Also, I don't think it can hurt to make this plugin only look for *.js files instead of grabbing all files in the pages dir.
If you agree, then I won't mind opening a PR that implements this.

@ematipico
Copy link
Owner

So we would like to upload also the source maps, which is a nice to have! If you want to give it a shot, please go a ahead! Let me know if you have any questions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants