As I mentioned in a previous query, I'm working with Symfony7 and in the latest updates (since Symfony 6.3) AssetMapper is recommended over Webpack. Given the problems I'm having with Metronic 8 in Symfony 7, I've been testing with AssetMapper and in principle everything starts to work (at least apparently). Setting up AssetMapper is quite easy and you only have to import the different .js in the app.js file. However, I get a problem with the "plugins.bundle.js" in the console. It says: "TyperError: Cannot set properties of undefined (setting 'moment')". I've seen in the comments about it that it would be solved with webpack, but I'm trying to avoid webpack and make the application lighter, how can it be solved.
How can I solve the problem, is it necessary to import and call some library that is not included in the asset folder of the demo?
Thanks.
Hi Restituto Vaño,
Here are some steps you can try:
Please copy plugins.bundle.js from the HTML version demo1, into your Symfony project. Let's see if the plugin file works.
Try to rebuild assets with webpack. Inside the folder symfony/starterkit/_keenthemes/tools, run these commands:
npm install
npm run build