postcss-magento-import

1.3.3 • Public • Published

postcss-magento-import

A plugin to resolve the @magento_import statements in CSS files.

Install

npm install postcss-magento-import --save-dev

Usage

In your postcss.config.js file:

const postcssMagentoImport = require('postcss-magento-import');

module.exports = {
    plugins: [
        postcssMagentoImport({
            phpConfigFile: 'app/etc/config.php',
            // or modules: [ 'Magento_Store', 'Magento_Catalog' ]
        })
    ]
};

And your css file:

@magento_import 'source/_module.css';

It should output something like:

@import "../../Magento_Store/web/css/source/_module.css";
@import "../../Magento_Catalog/web/css/source/_module.css";

Package Sidebar

Install

npm i postcss-magento-import

Weekly Downloads

0

Version

1.3.3

License

MIT

Unpacked Size

5.84 kB

Total Files

5

Last publish

Collaborators

  • ubermanu