1.0.1 • Published 6 years ago

postcss-global-import-sync v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Postcss global import.

npm package

Installation

npm install --save postcss-global-import-sync

Example

@global-import './some-file.css'
/* Some Css */

Options

sync

In case of sync enabled this plugin will be work synchronously. It's useful in case with usage css-modules-require-hook hook, which doesn't support async postcss plugins.

Webpack config example

const globalImport = require('postcss-global-import-sync');

module.exports = {
  module: {
      loaders: [
          {
              test:   /\.css$/,
              loader: "style-loader!css-loader!postcss-loader"
          }
      ]
  },
  postcss: [
    globalImport()
  ]
}