I'm using Symfony 4.4 for a project and yesterday I deployed the project on my server. This is the first time I'm using the package webpack encore. It's cannot find the app.js and runtime.js files and the different images files...
This is the error message :
GET SERVERPATH/public/public/build/app.8faa2907.css net::ERR_ABORTED 404 (Not Found)
GET SERVERPATH/public/public/build/runtime.01250581.js net::ERR_ABORTED 404 (Not Found)
GET SERVERPATH/images/usersAvatar/5e685c89938b9522796974.jpeg 404 (Not Found)
I don't understund why I've two times /public/ for the path.
This is my webpack.config.js file :
var Encore = require('@symfony/webpack-encore');
const CopyWebpackPlugin = require('copy-webpack-plugin');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
.setOutputPath('public/build/')
.setPublicPath('public/build')
.addEntry('app', './assets/js/app.js')
.splitEntryChunks()
.enableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = 3;
})
.addPlugin(new CopyWebpackPlugin([
{from: './assets/static/', to: 'static'}
]))
.autoProvidejQuery()
;
module.exports = Encore.getWebpackConfig();
Do you have an idea ?