Hi i am using Symfony (6.2.8) with webpack encore (1.16). I use webpack to build my assets. The stylesheets are going great but when i want to build the js files i get an error when i add the functions.js file. The error says: "Critical dependency: the request of a dependency is an expression". Do you have any idea what might be the problem?
Thanks in advance!
Critical dependency: the request of a dependency is an expression
1 reply · opened Apr 14, 2023
Hello,
Apologies for the Inconveniences caused!
Canvas is not built for Webpack by default, but by any chance, can you please provide us with the Webpack Codes you are using so that we can check and possibly provide you with a solution.
Additionally, there are several ways to include JS with Canvas and all about it can be found here: https://docs.semicolonweb.com/docs/getting-started/javascript/ . We believe using the Using All Plugins & Disabling Async JS Loading solution mentioned in the Documentation should be the solution to your issue.
Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard