Skip to content

stylesheet_pack_tag not working in webpacker 4?? #2059

@AmirolAhmad

Description

@AmirolAhmad

based on the usage mention here, you can link them by using stylesheet_pack_tag which mean you add <%= stylesheet_pack_tag 'application' %> under views>layout>application.html.erb

but then when I view-source the web, there is no css loaded inside the <head>.

then to fixed this issue, i need to import import '../src/application.css' into packs/application.js to make the css file to work and load.

my question, is this how it should work? if so, what is the purpose to have <%= stylesheet_pack_tag 'application' %>? if you commented out this line, it is still work.

I have create the sample app for better picture about this

or maybe i miss some point somewhere else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions