Hi I am using html landing page of demo55 in symfony6 with webpack encore. When I tried to run yarn build command, it kept saying "./asserts/plugins.bundle.js" contains a reference to the file './locale', this file cannot be found.
and I have checked the demo55 folder, and cannot find this ./locale file anywhere inside the folder.
Where is this file located?
It appears that the issue is specific to the demo55 HTML version. Could you please provide details on any custom code you have included in your project? This will help us understand if the error is related to your modifications or if it is a problem within the original demo55 JS file.
Are you able to run from the demo55 html version? Does it has the issue with the missing /locale folder?
I can see the static landing page from demo55. it happens only when I run this yarn build from a symfony6 project.
Only I did was to copy mandatory js, css and fonts into symfony asserts folder and import mandatory js and css for all pages into app.js
* (and its CSS file) in your base layout (base.html.twig).
// any CSS you import will output into a single css file (app.css in this case)
// start the Stimulus application
(this is only thing I added)
and then run yarn build. it complains about './locale' not found. and I checked the plugins.bundle.js by searching './locale' and found that it was used inside, but nothing found outside folder structrue.
this symfony6 project is a brand new empty symfony project and created via symfony cli command 'symfony new my_project version="6.3.*" --webapp'.
Maybe the problem is that you are adding the plugins.bundle.js file as an entry in your webpack.config.js file, but this file is already bundled by webpack. Could you please try to addEntry with this file instead?
This file contains the original plugins that are not bundled yet. Maybe this will solve the errors. Let me know if it works.
I’m glad you solved it. We will check further on this issue. Feel free to let us know if you any question.
not sure why the js wants to find this folder, but at least there should be an empty check there for what if this locale folder doesn't exist
It seems like this issue is caused by the moment plugin, which is used by plugins.bundle.js.
You can try some of the solutions suggested in these links:
They suggest using a plugin or a configuration option to ignore or remove the locale files from moment.js
We are working on fixing this issue in our future updates. Thank you for your feedback and patience.