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

Loader issue: Error in *.styl #459

Closed
TheoMer opened this issue Aug 17, 2016 · 2 comments
Closed

Loader issue: Error in *.styl #459

TheoMer opened this issue Aug 17, 2016 · 2 comments

Comments

@TheoMer
Copy link

TheoMer commented Aug 17, 2016

As webpack.config is not accessible, I'm having an obvious issue with my *.styl files:

Module parse failed: *.styl Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.

I need to include the following syntax in my webpack.config file:

module: {
loaders: [
{
test: /\.styl$/,
include: path.join(__dirname, 'src'),
loader: 'style-loader!css-loader!stylus-loader'
}
]
}

How do I resolve this issue?

@gaearon
Copy link
Contributor

gaearon commented Aug 17, 2016

Currently there is no built-in support for CSS preprocessors.
If you want to use one, use its CLI to compile it down to CSS, and import that CSS.

Here is how to use stylus CLI:
https://github.com/stylus/stylus#basic-usage

@gaearon gaearon closed this as completed Aug 17, 2016
@TheoMer
Copy link
Author

TheoMer commented Aug 17, 2016

@gaearon Thanks, Dan! That worked a treat.

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants