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

bug generation RTL in laravel


Error when running

npm run dev --rtl --demo1

for rtl in laravel demo1


[webpack-cli] TypeError: compiler.plugin is not a function
at WebpackRTLPlugin.apply (/Users/......./node_modules/webpack-rtl-plugin/dist/index.js:38:12)
at createCompiler (/Users/......./node_modules/webpack/lib/webpack.js:73:12)
at create (/Users/......./node_modules/webpack/lib/webpack.js:134:16)
at webpack (/Users/......./node_modules/webpack/lib/webpack.js:142:47)
at WebpackCLI.f [as webpack] (/Users/......./node_modules/webpack/lib/index.js:63:16)
at WebpackCLI.createCompiler (/Users/......./node_modules/webpack-cli/lib/webpack-cli.js:2193:23)
at async WebpackCLI.runWebpack (/Users/......./node_modules/webpack-cli/lib/webpack-cli.js:2323:16)
at async Command. (/Users/......./node_modules/webpack-cli/lib/webpack-cli.js:1060:13)
at async Promise.all (index 1)
at async Command.


PlZ i need a fix


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 (2)


Hi Moha,

Could you please try to remove the node_modules folder and package-lock.json file, then retry with the "npm install".

Thanks



1. Start a clean setup according to the Metronic laravel documentation.
2. before "npm run dev" install yarn and run "yarn add --dev del"
3. and instead npm run dev command use "npm run dev --rtl --demo1"
4. after that you will find the RTL CSS files in the public folder.
Here is the list of CSS files that need to include in the HTML:
public/[demo]/css/style.bundle.rtl.css
public/[demo]/plugins/global/plugins.bundle.rtl.css
5. In the RTL documentation in http://localhost:8000/documentation/getting-started/rtl it says **
Change the CSS files reference in config/demo1/general.php
'assets' => array(
// ...
'css' => array(
'plugins/global/plugins.bundle.css',
'css/style.bundle.css',
),
// ...
),
**
IMPORTANT:
BUT YOU SHOULD NOT ADD RTL INTO THE CSS URLS!!!

6.Edit app/helpers.php to force enable RTL option.
function isRTL()
{
return true;
}

AND IT'S DONE!
enjoy!


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  :(