Skip to content

Commit 4746082

Browse files
committed
Warning about using the module in dev and instructions for running the example
1 parent b0ea586 commit 4746082

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Drop-in replacement of the css-loader, it simply checks the `dir` attribute on t
66

77
Uses [rtlcss](https://github.com/MohammadYounes/rtlcss) under the hood.
88

9+
**Warning** This module should only be used for development. The processing of your css being done server-side, the bundle will include both the regular css and the rtl version, which can make your bundle a lot bigger. If you're using the `extract-text-webpack-plugin`, check out the [webpack-rtl-plugin](https://github.com/romainberger/webpack-rtl-plugin).
10+
911
## installation
1012

1113
`npm install rtl-css-loader --save-dev`

example/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# rtl-css-loader example
2+
3+
# Usage
4+
5+
```shell
6+
# install the module dependencies
7+
cd ..
8+
npm install
9+
10+
# install the example dependencies
11+
cd example
12+
npm install
13+
14+
# run the webpack compilation
15+
npm run webpack
16+
17+
# start the development server (uses python)
18+
npm start
19+
```
20+
21+
Then open your browser at [http://localhost:3000](http://localhost:3000).
22+
23+
To see how the module works, open `index.html` then change the `dir` attribute on the `html` tag.

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html dir="rtl">
2+
<html dir="ltr">
33
<head>
44
<title></title>
55
</head>

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "rtl-loader-example",
2+
"name": "rtl-css-loader-example",
33
"version": "1.0.0",
44
"description": "",
55
"scripts": {
66
"start": "python -m SimpleHTTPServer",
7-
"webpack": "webpack --watch"
7+
"webpack": "webpack"
88
},
99
"author": "Romain Berger <romain@romainberger.com>",
1010
"license": "MIT",

0 commit comments

Comments
 (0)