-
-
Notifications
You must be signed in to change notification settings - Fork 428
Closed
Description
- Operating System: All
- Node Version: n/a
- NPM Version: n/a
- webpack Version: 4.27.0+
- sass-loader Version: trunk
Feature Proposal
The sass-loader plugin should allow the user to customize the mainFields and extensions used to resolve imports. The current defaults shown below may be insufficient for all use cases:
mainFields: ['sass', 'main'],
extensions: ['.scss', '.sass', '.css'],E.g. 'style' is not included in mainFields by default.
Feature Use Case
CSS imports may be specified by other properties in the package.json file and may have additional extensions. The plugin should allow the user to specify these settings in order to support other package.json property names and additional file extensions.
E.g. @fortawesome/fontawesome-free has a package.json file which lacks a 'sass' property, but contains a 'style' property. Due to the current non-modifiable defaults in this plugin, users must continue to use the full path in the @import statement.