@rsbuild/shared
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -39,7 +39,2 @@ import type { Configuration } from '@rspack/core'; | ||
/** | ||
* Specifies whether to modularize the import of [lodash](https://npmjs.com/package/lodash) | ||
* and remove unused lodash modules to reduce the code size of lodash. | ||
*/ | ||
transformLodash?: boolean; | ||
/** | ||
* Controls the Rsbuild's caching behavior during the build process. | ||
@@ -46,0 +41,0 @@ */ |
@@ -66,14 +66,76 @@ import type { Options as SassOptions, LegacyOptions as LegacySassOptions } from '../../compiled/sass'; | ||
export interface CSSLoaderOptions { | ||
/** | ||
* Allow to enable/disables handling the CSS functions url and image-set. | ||
* If set to false, css-loader will not parse any paths specified in url or image-set | ||
* | ||
* @default true | ||
*/ | ||
url?: boolean | ((url: string, resourcePath: string) => boolean); | ||
/** | ||
* Allows to enables/disables @import at-rules handling. | ||
* | ||
* @default true | ||
*/ | ||
import?: boolean | ((url: string, media: string, resourcePath: string) => boolean); | ||
/** | ||
* Allows to enable/disable CSS Modules or ICSS and setup configuration: | ||
*/ | ||
modules?: boolean | string | CSSModulesOptions; | ||
/** | ||
* By default generation of source maps depends on the devtool option. | ||
*/ | ||
sourceMap?: boolean; | ||
/** | ||
* Allows to enables/disables or setups number of loaders applied before CSS loader for @import at-rules, | ||
* CSS modules and ICSS imports, i.e. @import/composes/@value value from './values.css'/etc. | ||
* | ||
* @default 0 | ||
*/ | ||
importLoaders?: number; | ||
/** | ||
* By default, css-loader generates JS modules that use the ES modules syntax. | ||
* There are some cases in which using ES modules is beneficial, like in the case of module concatenation and tree shaking. | ||
* | ||
* @default true | ||
*/ | ||
esModule?: boolean; | ||
/** | ||
* Allows exporting styles as array with modules, string or constructable stylesheet (i.e. CSSStyleSheet) | ||
* | ||
* @default 'array' | ||
*/ | ||
exportType?: 'array' | 'string' | 'css-style-sheet'; | ||
} | ||
export type StyleLoaderInjectType = 'styleTag' | 'singletonStyleTag' | 'lazyStyleTag' | 'lazySingletonStyleTag' | 'linkTag'; | ||
export interface StyleLoaderOptions { | ||
/** | ||
* By default, style-loader generates JS modules that use the ES modules syntax. | ||
* There are some cases in which using ES modules is beneficial, like in the case of module concatenation and tree shaking. | ||
* | ||
* @default true | ||
*/ | ||
esModule?: boolean; | ||
/** | ||
* Allows to setup how styles will be injected into the DOM. | ||
* | ||
* @default 'styleTag' | ||
*/ | ||
injectType?: StyleLoaderInjectType; | ||
/** | ||
* If defined, the style-loader will attach given attributes with their values on <style> / <link> element. | ||
* @default {} | ||
*/ | ||
attributes?: Record<string, string>; | ||
/** | ||
* By default, the style-loader appends <style>/<link> elements to the end of the style target, which is the <head> tag of the page unless specified by insert. | ||
* This will cause CSS created by the loader to take priority over CSS already present in the target. | ||
* You can use other values if the standard behavior is not suitable for you, but we do not recommend doing this. | ||
* | ||
* @default 'head' | ||
*/ | ||
insert?: string | ((element: HTMLElement) => void); | ||
/** | ||
* Allows to setup absolute path to custom function that allows to override default behavior styleTagTransform. | ||
*/ | ||
styleTagTransform?: string | ((css: string, styleElement: HTMLStyleElement, options: Record<string, any>) => void); | ||
} |
@@ -31,3 +31,3 @@ /// <reference types="node" /> | ||
export declare const awaitableGetter: <T>(promises: Promise<T>[]) => AwaitableGetter<T>; | ||
export declare const getJsSourceMap: (config: NormalizedConfig) => false | "cheap-module-source-map" | "cheap-source-map" | "source-map" | "inline-cheap-source-map" | "inline-cheap-module-source-map" | "inline-source-map" | "inline-nosources-cheap-module-source-map" | "inline-nosources-source-map" | "nosources-cheap-source-map" | "nosources-cheap-module-source-map" | "nosources-source-map" | "hidden-nosources-cheap-source-map" | "hidden-nosources-cheap-module-source-map" | "hidden-nosources-source-map" | "hidden-cheap-source-map" | "hidden-cheap-module-source-map" | "hidden-source-map" | "eval-cheap-source-map" | "eval-cheap-module-source-map" | "eval-source-map" | "eval-nosources-cheap-source-map" | "eval-nosources-cheap-module-source-map" | "eval-nosources-source-map"; | ||
export declare const getJsSourceMap: (config: NormalizedConfig) => false | "cheap-module-source-map" | "eval" | "cheap-source-map" | "source-map" | "inline-cheap-source-map" | "inline-cheap-module-source-map" | "inline-source-map" | "inline-nosources-cheap-source-map" | "inline-nosources-cheap-module-source-map" | "inline-nosources-source-map" | "nosources-cheap-source-map" | "nosources-cheap-module-source-map" | "nosources-source-map" | "hidden-nosources-cheap-source-map" | "hidden-nosources-cheap-module-source-map" | "hidden-nosources-source-map" | "hidden-cheap-source-map" | "hidden-cheap-module-source-map" | "hidden-source-map" | "eval-cheap-source-map" | "eval-cheap-module-source-map" | "eval-source-map" | "eval-nosources-cheap-source-map" | "eval-nosources-cheap-module-source-map" | "eval-nosources-source-map"; | ||
export declare const getSharedPkgCompiledPath: (packageName: SharedCompiledPkgNames) => string; | ||
@@ -34,0 +34,0 @@ export declare const isURL: (str: string) => boolean; |
{ | ||
"name": "@rsbuild/shared", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "The internal shared modules and dependencies of Rsbuild.", | ||
@@ -126,3 +126,3 @@ "homepage": "https://rsbuild.dev", | ||
"dependencies": { | ||
"@rspack/core": "0.5.3", | ||
"@rspack/core": "0.5.4", | ||
"caniuse-lite": "^1.0.30001583", | ||
@@ -129,0 +129,0 @@ "postcss": "^8.4.33" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7708902
22928
+ Added@rspack/binding@0.5.4(transitive)
+ Added@rspack/binding-darwin-arm64@0.5.4(transitive)
+ Added@rspack/binding-darwin-x64@0.5.4(transitive)
+ Added@rspack/binding-linux-arm64-gnu@0.5.4(transitive)
+ Added@rspack/binding-linux-arm64-musl@0.5.4(transitive)
+ Added@rspack/binding-linux-x64-gnu@0.5.4(transitive)
+ Added@rspack/binding-linux-x64-musl@0.5.4(transitive)
+ Added@rspack/binding-win32-arm64-msvc@0.5.4(transitive)
+ Added@rspack/binding-win32-ia32-msvc@0.5.4(transitive)
+ Added@rspack/binding-win32-x64-msvc@0.5.4(transitive)
+ Added@rspack/core@0.5.4(transitive)
- Removed@rspack/binding@0.5.3(transitive)
- Removed@rspack/binding-darwin-arm64@0.5.3(transitive)
- Removed@rspack/binding-darwin-x64@0.5.3(transitive)
- Removed@rspack/binding-linux-arm64-gnu@0.5.3(transitive)
- Removed@rspack/binding-linux-arm64-musl@0.5.3(transitive)
- Removed@rspack/binding-linux-x64-gnu@0.5.3(transitive)
- Removed@rspack/binding-linux-x64-musl@0.5.3(transitive)
- Removed@rspack/binding-win32-arm64-msvc@0.5.3(transitive)
- Removed@rspack/binding-win32-ia32-msvc@0.5.3(transitive)
- Removed@rspack/binding-win32-x64-msvc@0.5.3(transitive)
- Removed@rspack/core@0.5.3(transitive)
Updated@rspack/core@0.5.4