kriasoft / kriasoft/fsharp-starter-kit

postcss-loader issues

Open
#7 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
87
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Two users reported me the following error:

```
[09:50:26] Finished 'appsettings' after 3ms
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'postcss'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
For typos: please correct them.
For loader options: webpack 2 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: {
new webpack.LoaderOptionsPlugin({
// test: /\.xxx$/, // may apply this only for some modules
options: {
postcss: ...
}
})
}
at webpack
```

It seems that the latest webpack 2 beta is not compatible with the stable postcss-loader. [aspnet-starter-kit](https://github.com/kriasoft/aspnet-starter-kit/) have already [fixed that issue](https://github.com/kriasoft/aspnet-starter-kit/commit/a247de34d154e418b53b95033a6d42f442cef07d). Could you please merge that commit?

Contributor guide

Open the contributing guide

Research direction

Start by comparing this repository's Webpack configuration with the linked aspnet-starter-kit commit, focusing on how postcss options are passed for Webpack 2. Reproduce the reported configuration validation error, then verify the configuration no longer reports an unknown postcss property.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.