Parcel: `--no-source-maps` flag appears to be ignored during build in `1.10.1`

Created on 29 Sep 2018  路  9Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

--no-source-maps flag appears to be ignored during build. This just started happening recently, so I'm assuming it started in either 1.10.0 or 1.10.1.

馃帥 Configuration (.babelrc, package.json, cli command)

CLI via npm script:

"build": "parcel build src/index.html -d dist --no-source-maps",

馃 Expected Behavior

No source maps.

馃槸 Current Behavior

Source maps.

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.10.1
| Node | 10.10.0
| npm/Yarn | npm 6.3.0
| Operating System | Windows 10

Bug

Most helpful comment

Fixed by #2089 ?

All 9 comments

Also experiencing this issue.
It's notable that the source map gets created but not linked from the JS file.

Im also experiencing this 1.10.1.

Somehow this issue just disappeared yesterday, not sure why.

It seems this issue happens in >=1.10.0

Fixed by #2089 ?

I'm still seeing this behavior on 1.11.0

I am still seeing this issue on parcel-bundler 1.11.0.

  1. If I build with source maps, then rm -r dist/ and build with --no-source-maps, then I still get source maps in dist/
  2. If I then rm -r .cache/ dist/ to remove both the cache and dist and build again with --no-source-maps, then I get it without source maps
./node_modules/.bin/parcel --version
1.11.0

You must remove the .cache directory to make the flags work as expected. The flag policy seems to be flag-first.

Opened a new issue to track this further as we have a more specific view on why this is happening now.

Further discussion should be moved here: #2692

Thanks for the detailed reproduction steps @mrcoles

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Niggler picture Niggler  路  3Comments

devongovett picture devongovett  路  3Comments

will-stone picture will-stone  路  3Comments

davidnagli picture davidnagli  路  3Comments

donaldallen picture donaldallen  路  3Comments