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 serve (watch) not update files #2105

Closed
ManzDev opened this issue Oct 3, 2018 · 5 comments
Closed

Parcel serve (watch) not update files #2105

ManzDev opened this issue Oct 3, 2018 · 5 comments

Comments

@ManzDev
Copy link

ManzDev commented Oct 3, 2018

🐛 bug report

On windows, parcel serve apparently don't work. Strange random or unknown working.

Steps:

git clone https://github.com/ManzDev/parcel-document-blank
cd parcel-document-blank
npm install
npm run dev
  • npm dev task: parcel serve src/index.pug --open

🎛 Configuration (.babelrc, package.json, cli command)

Included in repo: https://github.com/ManzDev/parcel-document-blank

🤔 Expected Behavior

✔️ Blank page.
✔️ When add .pug content: update page browser with html content changes.
✔️ When add .pcss content: update page browser with css visual changes.

😯 Current Behavior

With Parcel 1.10.1
✔️ Blank page.
When add .pug content: ❌ no update on save
When add .pcss content: ❌ no update on first save, ✔️ update CSS on second and next saves but not HTML. (if reload browser with F5, I see changes correctly)

With downgrade to Parcel 1.9.2
✔️ Blank page.
When add .pug content: ✔️ update page browser with html content changes.
When add .pcss content: ❌ no update on first save, ✔️ update on second and next saves.

💁 Possible Solution

Not sure.

💻 Code Sample

https://github.com/ManzDev/parcel-document-blank

🌍 Your Environment

Software Version(s)
Parcel 1.10.1
Node 8.11.4
npm/Yarn 6.4.1
Operating System Windows 10 Pro
@argyleink
Copy link

i can confirm that HMR is broken with pug in 1.10.1, compiling is happening, browser is just not auto refreshed

@Hentioe
Copy link

Hentioe commented Oct 4, 2018

The same is true on Linux(Ubuntu 18.04). I temporarily lowered the parcel-bundler to version 1.9.2.

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Oct 4, 2018

Got fixed already #2091

@evgmel
Copy link

evgmel commented Feb 28, 2019

@DeMoorJasper Hello!
I had to upgrade my parcel version from 1.9.3 to 1.11.0, because some of Babel plugins were available only on 7th version. But now when I run parcel index.html it does not make an update properly. Parcel only watches for the first changes save, makes hot module reload and then if I make some changes at THE SAME file again it does not affect anything. If I change another file Parcel detects changes and makes reload, but the previous file changes does not apply at all.

Technical details:

  • Linux Mint 19 Cinnamon
  • yarn (v1.13.0)
  • parcel (v.1.11.0)
  • node (v10.15.1)

This is my dev dependencies before I have upgraded packages:

{
    "devDependencies": {
        "babel-core": "^6.26.3",
        "babel-jest": "23.4.0",
        "babel-plugin-transform-object-rest-spread": "6.26.0",
        "babel-preset-env": "1.7.0",
        "@vue/component-compiler-utils": "2.0.0",
        "eslint": "^5.9.0",
        "eslint-plugin-jest": "^22.0.0",
        "eslint-plugin-vue": "^5.0.0-beta.4",
        "jest": "23.4.1",
        "parcel-bundler": "1.9.3",
        "pug": "2.0.3",
        "vue-template-compiler": "2.5.16"
    }
}

This is what it became after changes:

"devDependencies": {
        "@babel/core": "^7.3.4",
        "babel-jest": "^24.1.0",
        "@babel/plugin-proposal-object-rest-spread": "^7.3.4",
        "@babel/plugin-syntax-dynamic-import": "^7.2.0",
        "@babel/preset-env": "^7.3.4",
        "babel-plugin-transform-dynamic-import": "^2.1.0",
        "babel-plugin-transform-object-rest-spread": "^6.26.0",
        "@vue/component-compiler-utils": "2.0.0",
        "eslint": "^5.9.0",
        "eslint-plugin-jest": "^22.0.0",
        "eslint-plugin-vue": "^5.0.0-beta.4",
        "jest": "^24.1.0",
        "parcel-bundler": "^1.11.0",
        "pug": "2.0.3",
        "vue-template-compiler": "2.5.16"
    }

Babel config file content (.babelrc) before upgrade:

{
  "presets": [
    "env"
  ],
  "plugins": [
    "transform-object-rest-spread"
  ]
}

Babel config file content after upgrade:

{
  "presets": [
    "@babel/preset-env"
  ],
  "env": {
    "test": {
      "plugins": [
        "@babel/plugin-proposal-object-rest-spread",
        "transform-dynamic-import"
      ]
    }
  },
  "plugins": [
    "@babel/plugin-proposal-object-rest-spread",
    "@babel/plugin-syntax-dynamic-import"
  ]
}

Could you, please, tell me whether I should open an Issue or may be you have some advises to fix the problem?
Thank you!

@evgmel
Copy link

evgmel commented Mar 5, 2019

Created an issue #2716

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

No branches or pull requests

5 participants