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

importer with indentation-based syntax not working correctly #247

Closed
Conduitry opened this issue Mar 11, 2018 · 4 comments
Closed

importer with indentation-based syntax not working correctly #247

Conduitry opened this issue Mar 11, 2018 · 4 comments

Comments

@Conduitry
Copy link

Conduitry commented Mar 11, 2018

(This is on the JavaScript compiled version on npm, if that matters.)

sass.renderSync({
	data: '@import file.sass',
	indentedSyntax: true,
	importer: () => ({
		contents: `
span
	color: pink
`,
	}),
})

Since I used indentedSyntax: true and since the imported file's extension is .sass, I would expect this to work, but I'm getting a parse error about expecting a {, presumably because the imported file is being parsed as SCSS syntax.

@nex3
Copy link
Contributor

nex3 commented Mar 11, 2018

This matches Node Sass's behavior. As far as I know, there's no way to import an indented syntax file by contents using the Node Sass API, although the @sass/node-sass team might know better.

@nex3 nex3 closed this as completed Mar 11, 2018
@xzyfer
Copy link

xzyfer commented Mar 12, 2018 via email

@nex3
Copy link
Contributor

nex3 commented Mar 12, 2018

@xzyfer Can you link to that issue? We should definitely coordinate on revamping the JS importer API in general, since it's now shared between two implementations.

@xzyfer
Copy link

xzyfer commented Mar 12, 2018

The issue is sass/node-sass#1192. We need to decide on how to expose sass2scss to the importer.

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

3 participants