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

Parcel 2 (latest nightly) generates a .map file with --no-source-maps. #4390

Closed
utkarshkukreti opened this issue Mar 27, 2020 · 3 comments · Fixed by #4393 or #4528
Closed

Parcel 2 (latest nightly) generates a .map file with --no-source-maps. #4390

utkarshkukreti opened this issue Mar 27, 2020 · 3 comments · Fixed by #4393 or #4528

Comments

@utkarshkukreti
Copy link

🐛 bug report

Parcel 2 (latest nightly) generates a .map file with --no-source-maps.

To reproduce:

$ yarn parcel --version
2.0.0-nightly.180+a1a2515f

$ cat a.js
console.log(1 + 2);

$ rm -rf dist && yarn parcel build a.js && cat dist/a.js.map
dist/a.js    46 B     10ms
└── a.js     20 B    655ms

{"mappings":"AAAAA,QAAQC,IAAI","sources":["a.js"],"names":["console","log"],"version":3,"file":"a.js.map","sourcesContent":["console.log(1 + 2);\n"]}                                                                                          

$ rm -rf dist && y parcel build --no-source-maps a.js && cat dist/a.js.map
dist/a.js    46 B      2ms
└── a.js     20 B    655ms

{"mappings":"AACAA,QAAQC,IAAI","sources":["0"],"names":["console","log"],"version":3,"file":"a.js.map","sourcesContent":[null]}

With --no-source-maps, dist/a.js.map is still generated (it doesn't have sourcesContent though).

🤔 Expected Behavior

.map file should not be generated.

😯 Current Behavior

.map file is generated.

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-nightly.180+a1a2515f
Node v13.11.0
npm/Yarn yarn 1.22.4
Operating System macOS 10.15.3
@DeMoorJasper
Copy link
Member

Will look into this and create a fix later today

@utkarshkukreti
Copy link
Author

@DeMoorJasper thanks, the new nightly works!

@steelcracker
Copy link

Hmm.. [email protected] - ok with parcel build.
But still generates a 1kb js.map with parcel watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants