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

Postcss Syntax Tag #13

Open
Pedroglp opened this issue Feb 17, 2020 · 4 comments · May be fixed by #14
Open

Postcss Syntax Tag #13

Pedroglp opened this issue Feb 17, 2020 · 4 comments · May be fixed by #14

Comments

@Pedroglp
Copy link

Pedroglp commented Feb 17, 2020

I think the syntax tag is not currently being passed forward to postcss processor.

ie:

// postcss.config.js
module.exports = {
  syntax: 'postcss-scss',
  plugins: {}
}
//webpack.config.js
	module: {
		rules: [
			{
				test: /\.svelte$/,
				use: {
					loader: 'svelte-loader',
					options: {
						preprocess: {
							style: sveltePreprocessPostcss({
								configFilePath: './postcss.config.js',
								useConfigFile: true,
							})
						},
						emitCss: true,
						hotReload: true
					}
				}
			},

Error:

image

image

Options object is not used.

This makes a little bit harder to use syntax plugins like: postcss-less, postcss-sass, postcss-scss.

@TehShrike
Copy link
Owner

The PostCSS processor does not take a "syntax" argument.

https://github.com/postcss/postcss#js-api

Where do you expect that string to get used?

@Pedroglp
Copy link
Author

Yes it does, but it is not documented:

image

https://github.com/postcss/postcss/blob/master/lib/postcss.d.ts

1 similar comment
@Pedroglp
Copy link
Author

Yes it does, but it is not documented:

image

https://github.com/postcss/postcss/blob/master/lib/postcss.d.ts

TehShrike added a commit that referenced this issue Feb 27, 2020
@TehShrike TehShrike linked a pull request Feb 27, 2020 that will close this issue
@TehShrike
Copy link
Owner

Ah, you're talking about the options argument. That is documented: https://github.com/postcss/postcss#options

I opened a PR #14 that should probably fix this, but I haven't tested it. Could you install that pass-options-to-processor branch and test it locally to make sure it works, and fixes your issue?

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 a pull request may close this issue.

2 participants