4.0.0 • Published 3 years ago

postcss-easy-import v4.0.0

Weekly downloads
35,274
License
MIT
Repository
github
Last release
3 years ago

postcss-easy-import Build Status

PostCSS plugin to inline @import rules content with extra features.

Usage

postcss([ require('postcss-easy-import') ])

See PostCSS docs for examples for your environment.

Resolving files with globs

The path to the file will be checked and if it contains a glob it will be used to locate it. These can be mixed and matched with normal module paths:

@import "suitcss-utils-display"; /* node_modules */
@import "./theme.css"; /* relative path */
@import "./components/*.css"; /* glob */
@import "suitcss-utils-size/lib/*.css"; /* glob inside node_modules */

Options

This plugin is a postcss-import extension which introduces its own resolve option.

prefix

Type: false or string Default: false

Allows partial-like importing with a prefix before the filename.

@import 'modules/partial.css';
/* will import modules/_partial.css */

Prefixed versions are always favoured. Otherwise the non-prefix version is used:

├── _baz.css
├── baz.css
├── bar.css

The matched files would be ['_baz.css', 'bar.css'].

extensions

Type: array or string Default: .css

Defines file extensions which will be looked for.

License

MIT © Bogdan Chadkin

@mikestopcontinues/postcss-config-contoursessungatsby-theme-ghost-reloaded@dubb/mickeyxr3-client@native-elements/coresimplistic-css@everything-registry/sub-chunk-2460sw-react-scriptswindbreaker-tailwindwcxweb-styleguide-nextsupple-preprocessorswrve-react-scriptsvizz-wysiwygvcl-preprocessorvue-custom@concisecss/preprocessor@bluecadet/drops@cangir/gatsby-theme-casper-v3ira-npxsuitcss-preprocessortwreporter-react-index-pageticketmelon-web@arxpoetica/sapper-trimmings@alanquigley/react-scripts@alotool/bl-pack@alotool/blogger-pack@actonate/mirkwood-rx@coffeekraken/s-postcss-builder@dh253/nds@dgrammatiko/joomla-toolszent-kitvue-merge-less@dubb/junior@fiizy/postcss@highpoint/merge-scss@etidbury/ts-next-helpers@frosti/config@fusionary/postcss-base@fusionary/postcss-config@infinitebrahmanuniverse/nolb-postcss-e@metamodern/static@mamba/configs@mambasdk/configs@kard/react-tools@kard/webpack-config@khirayama/handle-ui@khirayama/react-ui-components@sapper-dragon/postcss@notiv/gulp-builder@spatie/webpackmvf-patternsmetaserve-css-postcssneat-gulp-xgjnartex.concise.cssreact-activity-feed-streamrcostexams.cssneutrino-preset-fusionary-webnpm-npxpengliheng-componentperitext-generator-nextpineglade-apppostcss-easy-toolspostcss-tailwindcss-config-creatorghost-spiritgpupo-npm-devifuihiqlsv-componentskrau@tilnet/wp-frontend@tutor2u/tutor2u-ui@vizzuality/wysiwyg@usehenri/react@zalastax/nolb-postcss-e@swrve/swrve-react-scripts@swrve/react-scripts@talentgarden/react-componentsairductasm.csschange-style-varscokitcs-service-tms-customer-portal-uicssplus-preprocessorcthreem-core-tailwindcssdeng-npxbloggerpackbelgebrady-sutton-react-scriptsember-bedrockember-cli-tailwindempress-blog-casper-templateempress-blog-starter-templateempress-blog-swf-casper-templategatsby-theme-try-ghost
4.0.0

3 years ago

3.0.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago