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

Give priority to styl files in StylusAsset resolver #1090

Merged
merged 2 commits into from
Apr 13, 2018

Conversation

brandon93s
Copy link
Contributor

@brandon93s brandon93s commented Mar 28, 2018

Stylus's base case expects a .styl file. If a folder has two or more files with the same name, but different extensions, any styl file should take precedence for the sake of resolution. This sorts styl to the top of the list so that it is checked first.
Closes #1110

const resolver = new Resolver(asset.options);
const resolver = new Resolver(
Object.assign({}, asset.options, {
extensions: getResolverExtensions(asset.options)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should just hard-code the extensions supports importing? ['.styl', '.css'] - currently it's not possible to e.g. import a .less file from stylus anyway. WDYT?

@devongovett devongovett merged commit 89952d7 into parcel-bundler:master Apr 13, 2018
@brandon93s
Copy link
Contributor Author

@devongovett Thanks for wrapping this up, been traveling without PC!

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

Successfully merging this pull request may close these issues.

3 participants