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

RTL Support


I am getting this error when I run this command: npm run rtl

Failed to load '/Users/mohammedhamouda/Desktop/Work/AiiA/dots_frontend/rtl.config.js' config

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/mohammedhamouda/Desktop/Work/AiiA/dots_frontend/node_modules/del/index.js from /Users/mohammedhamouda/Desktop/Work/AiiA/dots_frontend/rtl.config.js not supported.
Instead change the require of index.js in /Users/mohammedhamouda/Desktop/Work/AiiA/dots_frontend/rtl.config.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/mohammedhamouda/Desktop/Work/AiiA/dots_frontend/rtl.config.js:2:13) {
code: 'ERR_REQUIRE_ESM'
}


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 Mohammed Hamouda

Please use this updated rtl.config.js file. We will update it soon.


const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const RtlCssPlugin = require("rtlcss-webpack-plugin");

// Define paths
const rootPath = path.resolve(__dirname);
const distPath = path.join(rootPath, "src/assets");
const entryPath = path.join(distPath, "sass/style.scss");

module.exports = {
mode: "development",
stats: "verbose",
performance: {
hints: "error",
maxAssetSize: 10000000,
maxEntrypointSize: 4000000,
},
entry: {
"css/style": entryPath,
},
output: {
path: distPath,
filename: "[name].js",
},
resolve: {
extensions: [".scss"],
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].rtl.css",
}),
new RtlCssPlugin({
filename: "[name].rtl.css",
}),
],
module: {
rules: [
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
{
loader: "sass-loader",
options: {
sourceMap: true,
},
},
],
},
],
},
};


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