You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fixrails#54241
- ### Problem
The `import` statement generated is incorrect for Rails applications
using importmap and a css processor.
### Context
Rails applications using `importmap` and having a `package.json`,
would get a `channel.js` file generated with a relative path,
whereas the correct import statement needs to match the name of the
importmap json keys.
This is because the generator assumes that if a `package.json`
exists in the project, this means it uses a javascript bundling
tool. This assumption is not correct as one can be using importmap
while still having `package.json` for processing css.
This is the case when you generate your application like this:
`rails new blorgh --css postcss`
### Solution
Add the right import statement by checking if the project uses
importmap.
0 commit comments