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

app.js seems not working on production build #11

Closed
LouRaul opened this issue Oct 12, 2020 · 3 comments
Closed

app.js seems not working on production build #11

LouRaul opened this issue Oct 12, 2020 · 3 comments

Comments

@LouRaul
Copy link

LouRaul commented Oct 12, 2020

Hi! 👋
(First of all, thanks for this template, it's super useful for a newbie like me)

I'm trying to install alpine.js using NPM, and although it's working locally (npm start) it doesn't work when deploying on Netlifly (NPM run build)

This is what I did:

  1. I install Alpine.js using npm i alpinejs
  2. I added import 'alpinejs' to src/_assets/scripts/site.js (first line)

These are the things I checked that make me think maybe app.js is not loading on production

  • Show/hide behaviors are not working
  • Console.log message is not loading
  • I can't access /static/app.bundled.js (Netlify screen file not found)
  • I also checked https://webstarter.chriscollins.me/ with same results

Is it possible there is a problem when building the app.bundled.js?

Site on Production: https://baterias-gesell.netlify.app/
Repo: https://github.com/LouRaul/baterias-gesell

Thnaks!

@chrissy-dev
Copy link
Owner

Hey @LouRaul,

Thanks for flagging this.

This appears to be a strange recent issue with Netlify and applying the .gitignore contents to the /dist folder.

There's a post on Netlify Community about this and although they've made changes, I'm still seeing this behaviour.

I've pushed an update to directly bundle the script into /dist on production and Netlify is sucessfully uploading the bundle now.

Once again, thanks for taking the time to flag this 👍

@chrissy-dev
Copy link
Owner

I've opened a PR for your repo to update the project 😄

@LouRaul
Copy link
Author

LouRaul commented Oct 13, 2020

Thanks for doing this!
Your template is amazing!

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

2 participants