Wako
Wako

Reputation: 158

SCSS/CSS doesn't load with webpack

I must update legacy code of a Rails app but i don't know why the Front is not display correctly and page loading is very slow, I can't contact the past developers

enter image description here

production

I got the code from heroku and it works well in production but not in development environment

When i launched the app for the first time i had this error

Webpacker::Manifest::MissingEntryError

And i fix it with

yarn install

I never used webpacker before in my Rails projects, i tried many things to fix it but it doesnt work and i don't know what is the way to lauch a Rails app correctly

UPDATE

I re installed webpacker on my environment and now the server compile with webpack but i got error about a JS library

ERROR in ./app/javascript/packs/landing.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'babel-preset-env' from (repository path)

Upvotes: 0

Views: 616

Answers (1)

Holino
Holino

Reputation: 86

I can't comment yet so I have to create an answer to help you. Your CSS doesn't seem to be compiled in development environment or the CSS files are not imported somehow.

There can be several issues for that. Do you have any errors in your terminal ? Is your webpack.yml well configured for development ?

development:
  <<: *default
  compile: true

Upvotes: 1

Related Questions