feat: add React support

This commit is contained in:
Maël Gangloff
2024-07-19 02:28:05 +02:00
parent 04d9fc20d3
commit 08e13e73c4
12 changed files with 173 additions and 74 deletions

View File

@@ -20,7 +20,7 @@ Encore
* Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
*/
.addEntry('app', './assets/app.js')
.addEntry('app', './assets/app.tsx')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks()
@@ -57,17 +57,17 @@ Encore
//.enableSassLoader()
// uncomment if you use TypeScript
//.enableTypeScriptLoader()
.enableTypeScriptLoader()
// uncomment if you use React
//.enableReactPreset()
.enableReactPreset()
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
//.enableIntegrityHashes(Encore.isProduction())
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
//.enableIntegrityHashes(Encore.isProduction())
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
;
module.exports = Encore.getWebpackConfig();