Comments (2)
I noticed this as well. It appears to be because parcel-rails is telling parcel to start its server for HMR but serving the assets from the rails process. This causes a slight path confusion. I fixed this by using the following in my Procfile
instead of bin/rails parcel:serve
:
parcel: yarn parcel serve --public-url /parcels -d public/parcels app/javascript/application.js
The --public-url /parcels
tells the parcel server to serve the files under /parcels
like rails is, that way it generates the correct path to application.map
.
from parcel-rails.
So I got a crappy commit set to let the parcel.rb configuration also set public-url flag on the yarn parcel
command:
I'm not the most prolific gem writer... I'd love to do it a better way that doesn't require the library to have to know about every single option parcel has as well as writing some tests for this. If someone has another gem or link to point me at, im happy to do the work get it done.
from parcel-rails.
Related Issues (10)
- Add generator which will generate the basic setup
- Add view helpers
- Integrate parcel server into rails s
- Sprockets integration HOT 1
- Gem Load Error is: uninitialized constant Rails::Generators HOT 2
- Handle HMR (hot-module-reloading) HOT 1
- Entry points and destination values defined in config/initializers/parcel.rb are not being used HOT 1
- Parcel does support multiple entry files
- Parcel config as generated doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parcel-rails.