Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Metronic - Symfony - AssetMapper


Hi all, I'm trying to use metronic with Symfony, and AssetMapper from symfony.
I have at the root of my project a folder _keenthemes with which I build the theme sources. The compiled sources fall into my assets/metronic folder as defined in webpack.config.js in the "tools" folder.
Styles etc. work.
However, I get this error: Uncaught ReferenceError: KTApp is not defined
In my console.

Could you please tell me how to integrate metronic with AssetMapper from Symfony?

Best regards,

Pierre


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Pierre,

Apologies for the delay in response. Regarding the "Uncaught ReferenceError: KTApp is not defined" issue, it might be related to the order in which the assets are imported.

In Metronic, the order of importing assets is crucial. Ensure that you are importing the required JavaScript files in the correct order. For example, you may want to include plugins.bundle.js first, followed by scripts.bundle.js.

If you're using the HTML version of Metronic, you can refer to the order in which assets are included in the HTML files. Try to replicate a similar order when including assets in Symfony using the AssetMapper.

If the issue persists, feel free to share more details about how you're currently importing the assets.

Thank you


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(