Skip to content

[v5] - node ace build don't build css file #4553

Answered by angelocoutinho
ekimkael asked this question in Help
Discussion options

You must be logged in to vote

Hey there,

I had the same issue with AdonisJS v5 where my CSS wasn't being included after building or using @entryPointStyle('app'). Here's how I fixed it:

Configure Webpack Encore

First, run the following command to set up Encore:

node ace configure encore

Create Entry Point Files

Make sure you have resources/js/app.js and resources/css/app.css files. If they don't exist, create them.

Import CSS in JavaScript

In resources/js/app.js, add this line:

import '../css/app.css';

Update Your Views

Include entry point scripts and styles in your HTML template. Your view should look like this:

<!DOCTYPE html>
<html lang="en">
<head>
  @entryPointScripts('app')
  @entryPointStyles('app')
</head>
<body

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ekimkael
Comment options

Answer selected by ekimkael
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants