Skip to content

Commit

Permalink
Merge pull request #14894 from webpack/feature/css-modules
Browse files Browse the repository at this point in the history
Initial work towards native css support
  • Loading branch information
sokra committed Dec 17, 2021
2 parents 1c6872b + 5c65d84 commit ccecc17
Show file tree
Hide file tree
Showing 113 changed files with 5,218 additions and 127 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ test/statsCases/** eol=lf
examples/* eol=lf
bin/* eol=lf
*.svg eol=lf
*.css eol=lf
**/*webpack.lock.data/** -text
36 changes: 36 additions & 0 deletions declarations/WebpackOptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,14 @@ export type CompareBeforeEmit = boolean;
* This option enables cross-origin loading of chunks.
*/
export type CrossOriginLoading = false | "anonymous" | "use-credentials";
/**
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
*/
export type CssChunkFilename = FilenameTemplate;
/**
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
*/
export type CssFilename = FilenameTemplate;
/**
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
*/
Expand Down Expand Up @@ -1976,6 +1984,14 @@ export interface Output {
* This option enables cross-origin loading of chunks.
*/
crossOriginLoading?: CrossOriginLoading;
/**
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
*/
cssChunkFilename?: CssChunkFilename;
/**
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
*/
cssFilename?: CssFilename;
/**
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
*/
Expand Down Expand Up @@ -2692,6 +2708,14 @@ export interface AssetResourceGeneratorOptions {
*/
publicPath?: RawPublicPath;
}
/**
* Generator options for css modules.
*/
export interface CssGeneratorOptions {}
/**
* Parser options for css modules.
*/
export interface CssParserOptions {}
/**
* No generator options are supported for this module type.
*/
Expand Down Expand Up @@ -2770,6 +2794,10 @@ export interface ExperimentsCommon {
* Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
*/
cacheUnaffected?: boolean;
/**
* Enable css support.
*/
css?: boolean;
/**
* Apply defaults of next major version.
*/
Expand Down Expand Up @@ -3112,6 +3140,14 @@ export interface OutputNormalized {
* This option enables cross-origin loading of chunks.
*/
crossOriginLoading?: CrossOriginLoading;
/**
* Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
*/
cssChunkFilename?: CssChunkFilename;
/**
* Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
*/
cssFilename?: CssFilename;
/**
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
*/
Expand Down

0 comments on commit ccecc17

Please sign in to comment.