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

[Question] Is there a way to disable map files? #9205

Closed
h0rhay opened this issue Oct 18, 2018 · 5 comments
Closed

[Question] Is there a way to disable map files? #9205

h0rhay opened this issue Oct 18, 2018 · 5 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: awaiting author response Additional information has been requested from the author type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@h0rhay
Copy link

h0rhay commented Oct 18, 2018

I'm trying to eliminate the sourcemap clutter for a production build deployment.

I've tried the gatsby-plugin-no-sourcemaps plugin.. with this config:

{
      resolve: `gatsby-plugin-no-sourcemaps`
    }

I've also tried this:
https://medium.com/@bjornrixman/disable-source-maps-in-gatsby-7e9f82bdc55f

I've also tried this:

// gatsby-node.js
exports.onCreateWebpackConfig = ({ actions, stage }) => {
  if (stage === 'build-javascript') {
    // turn off source-maps
    actions.setWebpackConfig({
      devtool: false
    })
  }
};

From this thread:
#3817

None of the above works.. I still get a sourcemap JS file for EVERY path related to a Markdown file.. I have a few hundred MD files as its a documentation site.

Is there any way I can stop the map files being generated?

I'm on "gatsby": "^1.9.277" as 2 is still in beta.

Many thanks :)

@oorestisime
Copy link
Contributor

FYI gatsby 2 is already out (1 month ago) https://www.gatsbyjs.org/blog/2018-09-17-gatsby-v2/

@h0rhay
Copy link
Author

h0rhay commented Oct 18, 2018

Nice! thanks @oorestisime :)

@kakadiadarpan
Copy link
Contributor

@h0rhay can you try updating to Gatsby v2 and check if that resolves the issue for you?

@kakadiadarpan kakadiadarpan added status: awaiting author response Additional information has been requested from the author type: question or discussion Issue discussing or asking a question about Gatsby labels Oct 23, 2018
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jan 24, 2019
@gatsbot
Copy link

gatsbot bot commented Jan 24, 2019

Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open!

@gatsbot
Copy link

gatsbot bot commented Feb 4, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: awaiting author response Additional information has been requested from the author type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants