Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stylus Plugin] Importing files #1

Open
baryla opened this issue Feb 4, 2020 · 0 comments
Open

[Stylus Plugin] Importing files #1

baryla opened this issue Feb 4, 2020 · 0 comments
Labels
bug Something isn't working Plugin Issues related to a plugin Stylus Plugin Issues related to the Stylus plugin

Comments

@baryla
Copy link
Collaborator

baryla commented Feb 4, 2020

Problem

At the moment, it is not possible to import files from a .styl file. This is because the IIFE library of stylus that is being used doesn't come with this functionality. As an example, when we try to get an array of dependencies from a string like this:

const code = `@import "./test.styl"`;
console.log(stylus(code).deps());

we get an error saying:

Error: failed to require "visitor/deps-resolver"

even though calling deps() on an instance of stylus should technically work.

Solution

We need to explore ways to bundle stylus in way that allows us call these internal functions.

@baryla baryla added bug Something isn't working Transpiler labels Feb 4, 2020
@baryla baryla added Plugin Issues related to a plugin Stylus Plugin Issues related to the Stylus plugin and removed Transpiler labels Mar 5, 2020
@baryla baryla changed the title [Stylus Transpiler] Importing files [Stylus Plugin] Importing files Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Plugin Issues related to a plugin Stylus Plugin Issues related to the Stylus plugin
Projects
None yet
Development

No branches or pull requests

1 participant