Parcel: [Regression] --no-minify not working on pug since 1.12.x

Created on 4 Apr 2019  路  2Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

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

rm ./www -Rv; parcel build --out-dir www --no-minify src/index.pug

馃 Expected Behavior

Rendered html pages should be pretifier / indented

馃槸 Current Behavior

Rendered html pages are minimized

馃拋 Possible Solution

Maybe related to #2887

馃敠 Context

With this regression there is no way to build a dev / debug compiled version of our projects.
note included code is not minimized.

馃捇 Code Sample

Input

html
    head
        title
    body
        div#app
        script
            include ./index.js

Output

<html><head><title></title></head><body><div id="app"></div><script>var app = new Vue({
  el: '#app',
  data: {
    name: 'mundo',
    link: {
      url: 'http://asd.com',
      name: 'asd.com',
      show: true
    }
  }
});</script></body></html>

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.12.0 ~ .3
| Node | v10.15.3
| npm/Yarn | 6.9.0
| Operating System | Xbuntu 18.04.2

Bug

Most helpful comment

Good catch.
@DFOXpro If you really want pretty output, you should be able to set the pretty option in the pug option file:

// pug.config.js

module.exports = {
  pretty: true
};

All 2 comments

Not sure if this is bug. I found this #2582 PR which removes this ability due to Pug deprecating the pretty option. Pug API

Good catch.
@DFOXpro If you really want pretty output, you should be able to set the pretty option in the pug option file:

// pug.config.js

module.exports = {
  pretty: true
};
Was this page helpful?
0 / 5 - 0 ratings