Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'Try defining the path to your webpack.config.js file with --config ',
'Are you using create-react-app? Then run the following commands instead:',
<code>npm run build -- --stats</code>,
<code>mv build/bundle-stats.json stats.json</code>,
]
return {
error: true,
errorMessages: webpackConfigError,
ga: {
category: 'error',
action: 'upload-stats',
label: 'src not found',
},
}
} else {
const help = getDataFromStatsJson(stats)
if (help) {
return {
error: false,
help,
ga: { category: 'optimizer', action: 'upload', label: 'ok' },
}
} else {
return {
tryChild: true,
error: true,
errorMessages: null,
ga: {
category: 'error',
action: 'upload-stats',
label: 'no entrypoint, assets',
},