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
Replies (2)
- Start a clean setup according to the Metronic laravel documentation.
- before "npm run dev" install yarn and run "yarn add --dev del"
- and instead npm run dev command use "npm run dev --rtl --demo1"
- 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
- 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!
Hi Moha,
Could you please try to remove the node_modules folder and package-lock.json file, then retry with the "npm install".
Thanks