Comments (12)
Hi, I've started a webpack plugin to produce a second bundle processed with rtlcss: https://github.com/romainberger/webpack-rtl-plugin (available on npm). It's meant to be used with the extract-text-webpack-plugin.
Hope this helps you, feedback appreciated!
from rtlcss.
Small update if people are still interested, I've made a rtl-css-loader for webpack to replace the basic css-loader
so you can have rtl css with the style-loader
. Can be useful if you're using the style-loader for dev.
from rtlcss.
OK. For example, you have two bundles: main.css
and main.rtl.css
.
Then, import main.css
in main.rtl.css
:
@import "../main.css";
And process *.rtl.css
throw PostCSS with RTLCSS:
module.exports = {
module: {
loaders: [
{
test: /\.rtl\.css$/,
loader: "style-loader!css-loader!postcss-loader?pack=rtl"
},
{
test: /\.css$/,
loader: "style-loader!css-loader!postcss-loader"
}
]
},
postcss: function () {
return {
defaults: [autoprefixer, precss],
rtl: [rtlcss, autoprefixer, precss]
};
}
}
from rtlcss.
I have the exact same question actually but the answer of creating another rtl file is a bit weird actually. By using the extract-text-webpack-plugin, we should be able to generate the main.ltr.css file and the main.rtl.css file without even duplicating anything.
I will digg into it
from rtlcss.
I haven't used Webpack before! Did you consider https://github.com/postcss/postcss-loader ?
@ai Your input is highly appreciated!
from rtlcss.
But I am not really webpack user (for now, I prefer Browserify, because webpack API is ugly). So I can only show you a start point.
from rtlcss.
Thanks @ai
from rtlcss.
Thanks. I get the idea except I feel that importing main.css within main.rtl is a bit redundant and I guess it is a work around webpack that will only generate one file per entry. I will try to play with this a little bit and see how it goes and report back here. thanks again both.
from rtlcss.
Closing this as it's out of scope, but feel free to post here if you figure out a solution.
from rtlcss.
Cool ... Thanks!
from rtlcss.
Awesome 👍
from rtlcss.
Hello, anything new related to rtlcss usage with webpack?
Any easy way to do it without installing a third party plugin?
from rtlcss.
Related Issues (20)
- Ignore import not working HOT 5
- The background-position declarations are flipped differently on version v4.0.0 HOT 3
- background-position: HOT 2
- Integrating with Codeigniter
- Bootstrap 5.2 LTR and RTL at the same time (scss with Laravel vite) HOT 14
- using blacklist HOT 3
- aliases options don't work HOT 1
- Don't process data URLs
- Support src() with processUrls
- processUrls shouldn't process non-URL expressions in at-rules
- Bootstrap RTL and LTR at the same time HOT 2
- Unknown word error when "//' is used for commenting in scss files. HOT 1
- issue with media queries and onlyDiff option HOT 1
- This rtlcss package how to use in Laravel vite.config.js HOT 2
- RTLCSS Online
- RTLCSS errors when processing a value directive marked as important
- Tabbed menu not compatible HOT 5
- Can't deal with CSS
- Can't handle CSS style without semicolon HOT 2
- After compilation, ignore is invalid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtlcss.