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

assets not building in phoenix 1.5.1 #158

Closed
jalberto opened this issue Apr 27, 2020 · 8 comments
Closed

assets not building in phoenix 1.5.1 #158

jalberto opened this issue Apr 27, 2020 · 8 comments

Comments

@jalberto
Copy link

If I understand Torch correctly, assets are built into priv and serve from there as static files (by default priv/static is ignored by git so it makes sense).

Following README and generating a new context, I got not torch assets in my priv dir.]

am I missing a step?

@jalberto
Copy link
Author

So modifying original webpack config css line to /\.(sass|scss|css)$/ made the trick (the original version was not expecting sass but scss

@cpjolicoeur
Copy link
Member

@jalberto Thanks for bringing this to our attention.

We probably can/should update our output files to something that is recognized by the default webpack configs so users don't need to make this change.

I assume you are referring to this line here?

@cpjolicoeur cpjolicoeur reopened this Apr 27, 2020
@jalberto
Copy link
Author

jalberto commented Apr 27, 2020 via email

@cpjolicoeur
Copy link
Member

@jalberto I agree. I'd suggest maybe opening a Pull Request against the webpack config template in Phoenix to add sass to the regex check. Is that something you are open to tackling or would you prefer us to do it?

@cpjolicoeur
Copy link
Member

@jalberto As far as Torch is concerned, I don't think our asset files are doing anything special that require the SASS syntax vs the SCSS syntax. Torch, as a library, could convert our templates to SCSS and.

Your personally preference to use SASS over SCSS on a Phoenix project would probably fall outside the scope of what Torch as a library does, and as such, would probably require the same customization to the webpack config or an expansion of the official phoenix template.

I haven't opened any kind of Pull Request to the Phoenix project, but I did ask about their potential interest in the change here.

@jalberto
Copy link
Author

fair point :) will open an issue in Phoenix repo.

Thanks for your time!

@cpjolicoeur
Copy link
Member

Hey, @jalberto, sorry my mind clearly isn't working well today, but Torch doesnt really generate any sass files that your Phoenix application would access. Torch ships with pre-compiled CSS and JS files that are linked to from the default torch layout that is generated.

Your Phoenix project would never directly interact with the Sass files in the library, only the generated CSS and JS file.

@jalberto
Copy link
Author

jalberto commented Apr 28, 2020 via email

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