npm.io
1.0.1 • Published 8 years ago

postcss-global-import-sync

Licence
ISC
Version
1.0.1
Deps
2
Vulns
6
Weekly
0
DeprecatedThis package is deprecated

Postcss global import.

npm package

Installation

npm install --save postcss-global-import

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');

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

Keywords