I have a rails project deployed to heroku. After deployment, the CSS packaged by webpack does not work, but it works normally local.
Famous in Heroku's Application Logs:
webpack dev_server configuration not found in /app/config/webpacker.yml[production]
Please run bundle exec rails webpacker:install Webpacker
I execute $ heroku run bundle exec rails webpacker:install
,the situation remains unchanged.
I think the problem is that webpack is not working properly on heroku, but I don’t know how to deal with it.
Please give me some advice, thanks
//Procfile
web111: bin/rails server -p $port
webpack111: bin/webpack-dev-server
//package.json
{
"name": "test",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"@fullhuman/postcss-purgecss": "^3.1.3",
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "4.3.0",
"@tailwindcss/postcss7-compat": "^2.0.2",
"autoprefixer": "^9",
"flatpickr": "^4.6.9",
"font-awesome": "^4.7.0",
"postcss": "^7",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"turbolinks": "^5.2.0"
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^3.11.0"
}
}
question from:
https://stackoverflow.com/questions/65646380/rails-on-heroku-webpack-dev-server-configuration-not-found 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…