Changing config and adding rtl support

This commit is contained in:
SergeyEzhin 2022-04-08 18:50:26 +04:00
parent 6cd1b4acd3
commit 0f4f400cec
4 changed files with 16 additions and 5 deletions

View file

@ -15,7 +15,8 @@ window.jQuery = jQuery;
window.$ = jQuery;
// Import Framework7 Styles
import 'framework7/framework7-bundle.css';
// import 'framework7/framework7-bundle.css';
import 'framework7/framework7-bundle-rtl.css';
// Import Icons and App Custom Styles
// import '../css/icons.css';

View file

@ -20,7 +20,7 @@
<% } else { %>
<style><%= htmlWebpackPlugin.options.skeleton.stylesheet %></style>
<% } %>
<link rel="stylesheet" href="./css/app.rtl.css">
<!-- built styles file will be auto injected -->
</head>
<body>

View file

@ -2,6 +2,8 @@ const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const WebpackRTLPlugin = require('webpack-rtl-plugin');
// const rtlcss = require('rtlcss');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
@ -103,7 +105,8 @@ module.exports = {
options: {
config: {
path: path.resolve(__dirname, '..'),
}
},
// plugins: [rtlcss]
},
},
],
@ -123,7 +126,8 @@ module.exports = {
options: {
config: {
path: path.resolve(__dirname, '..'),
}
},
// plugins: [rtlcss]
},
},
{
@ -198,6 +202,10 @@ module.exports = {
new MiniCssExtractPlugin({
filename: 'css/[name].css',
}),
new WebpackRTLPlugin({
filename: 'css/[name].rtl.css',
diffOnly: true
}),
new HtmlWebpackPlugin({
filename: `../../../apps/${editor}/mobile/index.html`,
template: `../../apps/${editor}/mobile/src/index_dev.html`,

View file

@ -37,8 +37,10 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-i18next": "^11.8.5",
"rtlcss": "^3.5.0",
"swiper": "^6.4.8",
"template7": "^1.4.2"
"template7": "^1.4.2",
"webpack-rtl-plugin": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",