Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Passing options, such as paths, to importer #135

@jasonmit

Description

@jasonmit

Is it within the scope of the project to permit passing options, such as path to importer?

For example:

// reduced for brevit
// options.paths = ['/home/jasonmit/project', '/home/jasonmit/project/styles/app.css']
exports.import = function(options){
  return importer({
    path: options.paths
  })
};

https://github.com/segmentio/myth/blob/master/lib/features.js#L26

Would permit:

// project/styles/app.css
@import 'bower_components/foo/bar/baz.css';

Right now I need to use relative paths everywhere for imports outside of the source directory to be importable. I thought this was what the paths option was for, but then noticed it never gets passed to the importer.

// project/styles/app.css
@import '../../bower_components/foo/bar/baz.css';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions