Socket
Socket
Sign inDemoInstall

@3yourmind/sass-node-modules-importer

Package Overview
Dependencies
22
Maintainers
10
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @3yourmind/sass-node-modules-importer

SASS Importer That Handles node_modules with support for Lerna, package.json style, etc.


Version published
Maintainers
10
Install size
388 kB
Created

Readme

Source

@3yourmind/sass-node-modules-importer

node_modules importer for sass

Usage

`rollup.config.js:

import sassNodeModulesImporter from '@3yourmind/sass-node-modules-importer'
import scss from 'rollup-plugin-scss'

export default [
	scss({
		// passed directly to sass
		importer: sassNodeModulesImporter(),
		importer: sassNodeModulesImporter({ debug: true }),
		importer: sassNodeModulesImporter({ start: '~' }),
	}),
]
@import '~normalize.css/'; // Trailing slash is important if module ends with .css as sass will not call the importer otherwise

Supported Sources

  • (recursive) parent node_modules
  • package.json style property
  • files ending with importExtensions
  • index.css

Options

namedefaulttypedescription
debugfalsebooleanEnable debug logs
indexExtensions['.css', '.sass', '.scss']string[]Extensions to resolve when extension is omitted. Will prefer based on order.
start~stringPrefix string/char to refer to node_modules folders

Keywords

FAQs

Last updated on 22 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc