Skip to main content

All Questions

0 votes
0 answers
76 views

Use custom fonts Rails 7 with jsbundling (esbuild)

How to properly use custom fonts in Rails 7 with jsbundling? I'm trying to use Fontawesome-Free and Font Lora, but I'm getting a loader error. 13:46:30 web.1 | ActionController::RoutingError (No ...
Dmitry Tolstosheev's user avatar
0 votes
0 answers
16 views

Rails 7 and React monolith having routing errors when the page needs to be refreshed. How do I mitigate this?

Building a Rails 7 app using ESBuild and react in the same project. The React Router: app/javascript/routes/index.js import React from "react"; import { BrowserRouter as Router, Routes, ...
Sneeu Leeu's user avatar
0 votes
0 answers
82 views

Installing Summernote in Rails 7 with NPM and Esbuild

In my new Rails 7 project I want to install the summernote editor: https://summernote.org/getting-started/#without-bootstrap-lite So I did: yarn add summernote In my application.js: import '...
almo's user avatar
  • 6,287
0 votes
0 answers
155 views

Importing CSS Module in a Shadow DOM's Style Tag (`@import url()`) Using Stimulus Controller

I want to import a CSS module (in this case @algolia/autocomplete-theme-classic) in the style tag within the shadow root. The stimulus controller looks like this: // import '@algolia/autocomplete-...
yudukikun5120's user avatar
0 votes
0 answers
600 views

SOLVED! Rails 7 cant deploy with Capistrano after install esbuild

I have used import map and sprockets in my Rails app for the asset pipeline. I have now installed cssbundling (bootstrap) and jsbundling (esbuild). I then wanted to deploy my project to prod now the ...
Seppello's user avatar
1 vote
0 answers
682 views

Ruby on Rails 7 with esbuild generate multiples files .js

Ruby on rails 7 with esbuild rails new app-rails7 -j esbuild -d postgresql generate on package.json # package.json "build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/...
gilcierweb's user avatar
  • 2,674
2 votes
1 answer
2k views

How to load custom JS in Rails 7 ESBuild project?

I have Rails 7.0.4. I generated the project using this command. rails new myproject --database=postgresql -j esbuild --css bootstrap Thus, I don't have a file named config/importmap.rb. How do I load ...
PrimeTimeTran's user avatar
6 votes
3 answers
3k views

esbuild throwing `[ERROR] Could not resolve [import statement]` while setting up Ruby on Rails 7/React application

I am trying to set up my first Ruby on Rails 7 with a React app. I installed Ruby on Rails with the esbuild flag: rails new project_name -d postgresql -j esbuild I Yarn added react, react-dom and ...
baconsocrispy's user avatar
0 votes
1 answer
846 views

Rails 7 esbuild - how to manage global javascript functions?

My goal is to create global functions that I can use throughout my application. I found this answer but couldn't really apply it. The most basic gist of what I am wanting to do is: # app/javascript/...
thinkgeekguy's user avatar
3 votes
4 answers
5k views

How to add font awesome to rails 7 (jsbundling)?

Sorry this topic has been covered many times. However, I just created a new rails 7 app using esbuild, added font-awesome-sass to the gem file, created application.css.scss (already had application....
hellion's user avatar
  • 4,790
3 votes
0 answers
540 views

In Rails 7 with esbuild build, how do I run a script of esbuild fails?

I have this script that runs when running Rails 7 with esbuild build, this is inside package.json in the scripts attribute, it's ran from the Rails procfile: esbuild app/javascript/*.* --bundle --...
CafeHey's user avatar
  • 5,780
3 votes
1 answer
2k views

fire event from external controller

i'm moving to Rails 7 and i feel like there are so many changes but i'm confident on understanding them and be able to upgrade a personal applications i made myself for keeping my personal records and ...
barone's user avatar
  • 33
2 votes
1 answer
2k views

How automatically load all js controller files in Rails 7 with esbuild as JavaScript bundler

I'm trying to configure Rails 7 app to load all js Stimulus controllers automatically. I use esbuild as JavaScript bundler. If we're using Stimulus for Rails together with an import map, the ...
Yurii Stefaniuk's user avatar
1 vote
0 answers
118 views

How do I include svelte built CSS to the regular asset CSS pipeline

I made a new rails 7 app with esbuild: rails new myapp -j esbuild package.json: { "name": "app", "private": "true", "dependencies": { "...
Matrix's user avatar
  • 3,461
2 votes
1 answer
5k views

Why is esbuild not installed when creating new Rails 7 app with Bootstrap?

I create a new Rails 7 app using the following syntax in the command line: $ rails new app_name --css=bootstrap I get the following errors when the app is being created (only when including --css=...
Rebecca's user avatar
  • 128

15 30 50 per page