Giter Site home page Giter Site logo

Wrap @import to ignore about postcss-rtl HOT 15 OPEN

vkalinichev avatar vkalinichev commented on May 24, 2024 1
Wrap @import to ignore

from postcss-rtl.

Comments (15)

mhrabiee avatar mhrabiee commented on May 24, 2024 3

@mhrabiee
How did you import postcss-rtl at nuxt.config.js?
Please share it.

dadash kheili giram :))

@hbsoftco

npm i postcss-rtl --save-dev

nuxt.config.js

  build: {
    /*
     ** You can extend webpack config here
     */
    postcss: {
      plugins: {
        'postcss-rtl': {}
      }
    }
  }

from postcss-rtl.

hbsoftco avatar hbsoftco commented on May 24, 2024 2

@mhrabiee
How did you import postcss-rtl at nuxt.config.js?
Please share it.

dadash kheili giram :))

from postcss-rtl.

mhrabiee avatar mhrabiee commented on May 24, 2024 1

Probably is a Webpack issue in production mode. (When comments are striped).
Fixed via /* ! */

/*! rtl:begin:ignore */
@import '~leaflet/dist/leaflet.css';
/*! rtl:end:ignore */

Tested in Nuxt 2.12 & Laravel Mix 4

from postcss-rtl.

miladmeidanshahi avatar miladmeidanshahi commented on May 24, 2024 1

In new Quasar:

If you have been using quasar.conf.js > build > rtl in the form of an Object, then you must match these options now, since we've switched from the unmaintained postcss-rtl to postcss-rtlcss package.

from postcss-rtl.

FaridAghili avatar FaridAghili commented on May 24, 2024

Looking forward to it

from postcss-rtl.

jd-solanki avatar jd-solanki commented on May 24, 2024

+1

from postcss-rtl.

vkalinichev avatar vkalinichev commented on May 24, 2024

@peyman3d @FaridAghili @jd-0001

Is problem still actual?

I add test for it, and it passes

from postcss-rtl.

FaridAghili avatar FaridAghili commented on May 24, 2024

@vkalinichev
I've tested it right now.

app.scss:

@import '~bootstrap/dist/css/bootstrap.css';

/*rtl:begin:ignore*/
@import '~owl.carousel/dist/assets/owl.carousel.css';
/*rtl:end:ignore*/

// more codes ...

It's expected that OwlCarousel be ignored here (Cause it supports RTL by default and doesn't need to be RTLed), but it's still processed and RTLed.

laravel-mix: 5.0.1
postcss-rtl: 1.7.0

from postcss-rtl.

vkalinichev avatar vkalinichev commented on May 24, 2024

Hmm... Can you provide your postcss config? Maybe another plugins strips out the ignore-directives or something like that?

from postcss-rtl.

FaridAghili avatar FaridAghili commented on May 24, 2024

I'm using laravel-mix in a Laravel project.

webpack.mix.js file:

const mix = require('laravel-mix');

mix.sass('resources/sass/app.scss', 'public/css')
    .options({
        postCss: [
            require('postcss-rtl')({
                onlyDirection: 'rtl'
            })
        ]
    });

package.json file:

{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
        "bootstrap": "^4.4.1",
        "cross-env": "^7.0",
        "jquery": "^3.4.1",
        "laravel-mix": "^5.0.1",
        "owl.carousel": "^2.3.4",
        "popper.js": "^1.16.1",
        "postcss-rtl": "^1.7.0",
        "resolve-url-loader": "^3.1.1",
        "sass": "^1.25.0",
        "sass-loader": "^8.0.2",
        "vue-template-compiler": "^2.6.11"
    }
}

from postcss-rtl.

owen-soak avatar owen-soak commented on May 24, 2024

Experiencing the same issue with Owl Carousel
/*rtl:begin:ignore*/ @import '~owl.carousel/dist/assets/owl.carousel.css'; /*rtl:end:ignore*/

from postcss-rtl.

miladmeidanshahi avatar miladmeidanshahi commented on May 24, 2024

the same issue I can't ignore CSS files

from postcss-rtl.

miladmeidanshahi avatar miladmeidanshahi commented on May 24, 2024

@mhrabiee does't work on quasar framework :(

from postcss-rtl.

FaridAghili avatar FaridAghili commented on May 24, 2024

@mhrabiee @miladmeidanshahi doesn't work on laravel-mix 5 neither.

also tried this with no success.

from postcss-rtl.

mustafa-online avatar mustafa-online commented on May 24, 2024

Any solution for this on Quasar? 😢

from postcss-rtl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.