parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Auto-reload not triggered upon making a change to HTML or adding Tailwind classes

Open nikoescobal opened this issue 1 year ago • 1 comments

🐛 bug report

Parcel doesn't auto-reload after applying changes to HTML or when adding Tailwind classes. I have to reload manually to get the changes to apply. However, when I comment out the CDN from AlpineJS, it works just fine.

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

Here's what my package.json config looks like:

{
  "name": "kickoff",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "parcel src/index.html --open",
    "build": "parcel build src/index.html",
    "test": "npm run eslint && echo \"✅✅✅ All tests passed ✅✅✅\"",
    "eslint": "eslint --fix"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/nikoescobal/kickoff.git"
  },
  "keywords": [],
  "author": "",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/nikoescobal/kickoff/issues"
  },
  "homepage": "https://github.com/nikoescobal/kickoff#readme",
  "devDependencies": {
    "@babel/eslint-parser": "^7.18.9",
    "@parcel/css": "^1.12.0",
    "@parcel/transformer-sass": "^2.6.2",
    "eslint": "^8.20.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-plugin-import": "^2.26.0",
    "postcss-cli": "^10.0.0", 
    "tailwindcss": "^3.1.6",
    "parcel": "^2.6.2"
  },
  "dependencies": {
    "alpinejs": "^3.10.2"
  }
}

🤔 Expected Behavior

Making to the HTML or adding Tailwind classes should automatically trigger an auto-reload from Parcel.

😯 Current Behavior

I have to manually reload for the HTML changes/Tailwind classes to apply. However, if I uncomment the AlpineJS CDN, it works just fine.

💁 Possible Solution

Commenting out the AlpineJS script makes the file work, but then this defeats the purpose of being able to quickly build with both AlpineJS and TailwindCSS, given that I'll have to comment and then uncomment the CDN each time I'll be adding new methods, etc.

🔦 Context

I'm trying to set up a template so I can easily start a project with Parcel, TailwindCSS, and AlpineJS configured.

💻 Code Sample

Link to the repo

🌍 Your Environment

Software Version(s)
TailwindCSS ^3.1.6
Parcel ^2.6.2
Node v16.16.0
npm/Yarn 8.5.5
Alpine ^3.10.2
Operating System MacOS Monterey v12.4

nikoescobal avatar Jul 19 '22 06:07 nikoescobal

💻 Code Sample

That repo doesn't exist/is private.

mischnic avatar Jul 19 '22 07:07 mischnic

My apologies for that! I updated it to public now :)

On Tue, Jul 19, 2022, 3:38 PM Niklas Mischkulnig @.***> wrote:

💻 Code Sample

That repo doesn't exist/is private.

— Reply to this email directly, view it on GitHub https://github.com/parcel-bundler/parcel/issues/8320#issuecomment-1188707228, or unsubscribe https://github.com/notifications/unsubscribe-auth/APAFVW6W7MMK5PSFE3RSM7LVUZLPXANCNFSM536YEMVA . You are receiving this because you authored the thread.Message ID: @.***>

nikoescobal avatar Oct 11 '22 08:10 nikoescobal

Same issue

RobertChaw avatar Apr 18 '23 03:04 RobertChaw

Same issue! Have anyone solved it?

RobicaCodeaza avatar Oct 03 '23 10:10 RobicaCodeaza

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

github-actions[bot] avatar Mar 31 '24 12:03 github-actions[bot]