Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ export type AppIconItem = {
* the default value.
* @see https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/icons#purpose
*/
purpose?: string;
purpose?: LiteralUnion<'any' | 'maskable' | 'monochrome', string>;
};

export type AppIcon = {
Expand Down
10 changes: 8 additions & 2 deletions packages/core/src/types/thirdParty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type Connect from '../../compiled/connect/index.js';
import type HtmlRspackPlugin from '../../compiled/html-rspack-plugin/index.js';
import type { AcceptedPlugin, ProcessOptions } from '../../compiled/postcss';
import type { Rspack } from './rspack';
import type { LiteralUnion } from './utils';

export type { Connect };

Expand Down Expand Up @@ -182,7 +183,10 @@ export interface CSSLoaderOptions {
/**
* Allows to enable/disable CSS Modules or ICSS and setup configuration:
*/
modules?: boolean | string | CSSLoaderModulesOptions;
modules?:
| boolean
| LiteralUnion<'local' | 'global' | 'pure' | 'icss', string>
| CSSLoaderModulesOptions;
/**
* By default generation of source maps depends on the devtool option.
*/
Expand Down Expand Up @@ -237,7 +241,9 @@ export interface StyleLoaderOptions {
*
* @default 'head'
*/
insert?: string | ((element: HTMLElement) => void);
insert?:
| LiteralUnion<'head' | 'body', string>
| ((element: HTMLElement) => void);
/**
* Allows to setup absolute path to custom function that allows to override default behavior styleTagTransform.
*/
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/config/html/app-icon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type AppIconItem = {
src: string;
size: number;
target?: 'apple-touch-icon' | 'web-app-manifest';
purpose?: string;
purpose?: 'any' | 'maskable' | 'monochrome' | string;
};

type AppIcon = {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/config/html/app-icon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type AppIconItem = {
src: string;
size: number;
target?: 'apple-touch-icon' | 'web-app-manifest';
purpose?: string;
purpose?: 'any' | 'maskable' | 'monochrome' | string;
};

type AppIcon = {
Expand Down
Loading