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

Doesn't work with absolute path #19

Open
tamtakoe opened this issue Sep 15, 2015 · 2 comments
Open

Doesn't work with absolute path #19

tamtakoe opened this issue Sep 15, 2015 · 2 comments

Comments

@tamtakoe
Copy link

Windows 8.1, rework-import 2.1.0

rework(data)
    .use(imprt())
    .toString();

input

@import 'D:/Project/public/compiled/main/vendor/bootstrap.css';

output

D:\Project\node_modules\rework-import\index.js:109
                throw new Error(createError(file, src, opts.path));
                      ^
Error: Failed to find D:/Project/public/compiled/main/vendor/bootstrap.css in [
    D:\Project
]

P.S. stylus, less, etc. prepocessors work correct with absolute urls in imports

@MoOx
Copy link
Contributor

MoOx commented Sep 15, 2015

Why don't you just use

@import './public/compiled/main/vendor/bootstrap.css';

As you can see, the path is tried in your cwd (in your case D:/Project).

@tamtakoe
Copy link
Author

Because I set this path in my build. It scans files with styles and generates virtual all.css, all.styl, all.less etc. with imports.

Actually, what this plugin does not understand the absolute path — it is correct, but it is nesessary for builders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants