@rsbuild/core
Advanced tools
Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8
@@ -108,5 +108,5 @@ import RspackChain from '../compiled/rspack-chain'; | ||
readonly HMR: "hmr"; | ||
/** CopyWebpackPlugin */ | ||
/** CopyRspackPlugin */ | ||
readonly COPY: "copy"; | ||
/** HtmlWebpackPlugin */ | ||
/** HtmlRspackPlugin */ | ||
readonly HTML: "html"; | ||
@@ -113,0 +113,0 @@ /** ESLintWebpackPlugin */ |
@@ -13,3 +13,3 @@ import type { StatsCompilation, StatsValue } from '@rspack/core'; | ||
export declare const isObject: (obj: unknown) => obj is Record<string, any>; | ||
export declare const isPlainObject: (obj: unknown) => obj is Record<string, any>; | ||
export declare const isPlainObject: (o: unknown) => o is Record<string, any>; | ||
export declare const castArray: <T>(arr?: T | T[]) => T[]; | ||
@@ -16,0 +16,0 @@ export declare const cloneDeep: <T>(value: T) => T; |
@@ -18,3 +18,3 @@ /** | ||
export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME } from './constants'; | ||
export type { AliasStrategy, BuildOptions, BundlerPluginInstance, CacheGroup, CacheGroups, ClientConfig, ConfigChain, ConfigChainWithContext, ConsoleType, CreateCompiler, CreateCompilerOptions, CreateRsbuildOptions, CrossOrigin, CSSLoaderOptions, CSSModules, CSSModulesLocalsConvention, Decorators, DevConfig, DistPathConfig, EnvironmentContext, FilenameConfig, HtmlConfig, HtmlTagHandler, HtmlTagDescriptor, InspectConfigOptions, InspectConfigResult, LegalComments, Minify, ModifyBundlerChainFn, ModifyBundlerChainUtils, ModifyChainUtils, ModifyRspackConfigFn, ModifyRspackConfigUtils, ModifyRsbuildConfigFn, ModifyWebpackChainFn, ModifyWebpackChainUtils, ModifyWebpackConfigUtils, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedEnvironmentConfig, NormalizedHtmlConfig, NormalizedModuleFederationConfig, NormalizedOutputConfig, NormalizedPerformanceConfig, NormalizedSecurityConfig, NormalizedServerConfig, NormalizedSourceConfig, NormalizedToolsConfig, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, OutputConfig, OutputStructure, PerformanceConfig, PluginManager, Polyfill, PostCSSLoaderOptions, PostCSSPlugin, PreconnectOption, PrintUrls, PublicDir, PublicDirOptions, RequestHandler, RsbuildConfig, RsbuildContext, RsbuildEntry, RsbuildInstance, RsbuildMode, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RsbuildProvider, RsbuildTarget, RspackChain, RspackRule, ScriptInject, ScriptLoading, SecurityConfig, ServerAPIs, ServerConfig, SourceConfig, SplitChunks, StyleLoaderOptions, ToolsConfig, TransformFn, TransformHandler, TransformImport, WatchFiles, NodeEnv, } from './types'; | ||
export type { AliasStrategy, BuildOptions, BundlerPluginInstance, CacheGroup, CacheGroups, ClientConfig, ConfigChain, ConfigChainWithContext, ConsoleType, CreateCompiler, CreateCompilerOptions, CreateRsbuildOptions, CrossOrigin, CSSLoaderOptions, CSSModules, CSSModulesLocalsConvention, Decorators, DevConfig, DistPathConfig, EnvironmentContext, FilenameConfig, HtmlConfig, HtmlRspackPlugin, HtmlTagHandler, HtmlTagDescriptor, InspectConfigOptions, InspectConfigResult, LegalComments, Minify, ModifyBundlerChainFn, ModifyBundlerChainUtils, ModifyChainUtils, ModifyRspackConfigFn, ModifyRspackConfigUtils, ModifyRsbuildConfigFn, ModifyWebpackChainFn, ModifyWebpackChainUtils, ModifyWebpackConfigUtils, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedEnvironmentConfig, NormalizedHtmlConfig, NormalizedModuleFederationConfig, NormalizedOutputConfig, NormalizedPerformanceConfig, NormalizedSecurityConfig, NormalizedServerConfig, NormalizedSourceConfig, NormalizedToolsConfig, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, OutputConfig, OutputStructure, PerformanceConfig, PluginManager, Polyfill, PostCSSLoaderOptions, PostCSSPlugin, PreconnectOption, PrintUrls, PublicDir, PublicDirOptions, RequestHandler, RsbuildConfig, RsbuildContext, RsbuildEntry, RsbuildInstance, RsbuildMode, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RsbuildProvider, RsbuildTarget, RspackChain, RspackRule, ScriptInject, ScriptLoading, SecurityConfig, ServerAPIs, ServerConfig, SourceConfig, SplitChunks, StyleLoaderOptions, ToolsConfig, TransformFn, TransformHandler, TransformImport, WatchFiles, NodeEnv, } from './types'; | ||
export type { ChainIdentifier } from './configChain'; | ||
@@ -21,0 +21,0 @@ export { |
@@ -5,9 +5,9 @@ /** | ||
import rspack from '@rspack/core'; | ||
import type HtmlWebpackPlugin from 'html-rspack-plugin'; | ||
import type { HtmlRspackPlugin } from './types'; | ||
/** | ||
* This method is used to override the Rsbuild default html-plugin (html-rspack-plugin). | ||
*/ | ||
export declare const setHTMLPlugin: (plugin: typeof HtmlWebpackPlugin) => void; | ||
export declare const getHTMLPlugin: () => typeof HtmlWebpackPlugin; | ||
export declare const setHTMLPlugin: (plugin: typeof HtmlRspackPlugin) => void; | ||
export declare const getHTMLPlugin: () => typeof HtmlRspackPlugin; | ||
export declare const setCssExtractPlugin: (plugin: unknown) => void; | ||
export declare const getCssExtractPlugin: () => typeof rspack.CssExtractRspackPlugin; |
import type { Compiler } from '@rspack/core'; | ||
import type HtmlWebpackPlugin from 'html-rspack-plugin'; | ||
import type { HtmlTagObject } from 'html-rspack-plugin'; | ||
import type { HtmlRspackPlugin } from '../types'; | ||
import type { EnvironmentContext, HtmlTag, HtmlTagDescriptor, ModifyHTMLTagsFn } from '../types'; | ||
@@ -26,3 +26,3 @@ export type TagConfig = { | ||
publicPath: string; | ||
plugin: HtmlWebpackPlugin; | ||
plugin: HtmlRspackPlugin; | ||
}; | ||
@@ -29,0 +29,0 @@ export declare const hasTitle: (html?: string) => boolean; |
@@ -1,2 +0,2 @@ | ||
import type HtmlWebpackPlugin from 'html-rspack-plugin'; | ||
import type { HtmlRspackPlugin } from '../../../types'; | ||
export type BeforeAssetTagGenerationHtmlPluginData = { | ||
@@ -11,4 +11,4 @@ assets: { | ||
outputName: string; | ||
plugin: HtmlWebpackPlugin; | ||
plugin: HtmlRspackPlugin; | ||
}; | ||
export type As = 'audio' | 'document' | 'embed' | 'fetch' | 'font' | 'image' | 'object' | 'script' | 'style' | 'track' | 'worker' | 'video'; |
@@ -19,8 +19,7 @@ /** | ||
import type { Compiler, RspackPluginInstance } from '@rspack/core'; | ||
import type HtmlWebpackPlugin from 'html-rspack-plugin'; | ||
import type { PreloadOrPreFetchOption } from '../../types'; | ||
import type { HtmlRspackPlugin, PreloadOrPreFetchOption } from '../../types'; | ||
type LinkType = 'preload' | 'prefetch'; | ||
export declare class HtmlPreloadOrPrefetchPlugin implements RspackPluginInstance { | ||
readonly options: PreloadOrPreFetchOption; | ||
resourceHints: HtmlWebpackPlugin.HtmlTagObject[]; | ||
resourceHints: HtmlRspackPlugin.HtmlTagObject[]; | ||
type: LinkType; | ||
@@ -27,0 +26,0 @@ HTMLCount: number; |
@@ -1,2 +0,1 @@ | ||
import type HtmlWebpackPlugin from 'html-rspack-plugin'; | ||
import type RspackChain from '../../compiled/rspack-chain'; | ||
@@ -8,3 +7,3 @@ import type { ChainIdentifier } from '..'; | ||
import type { MultiStats, Stats } from './stats'; | ||
import type { WebpackConfig } from './thirdParty'; | ||
import type { HtmlRspackPlugin, WebpackConfig } from './thirdParty'; | ||
import type { MaybePromise, NodeEnv } from './utils'; | ||
@@ -79,2 +78,3 @@ export type OnBeforeBuildFn<B = 'rspack'> = (params: { | ||
}; | ||
type ArrayAtLeastOne<A, B> = [A, ...Array<A | B>] | [...Array<A | B>, A]; | ||
export type ModifyEnvironmentConfigUtils = { | ||
@@ -84,3 +84,3 @@ /** environment name. */ | ||
/** Merge multiple Rsbuild environment config objects into one. */ | ||
mergeEnvironmentConfig: (config: MergedEnvironmentConfig, ...configs: EnvironmentConfig[]) => MergedEnvironmentConfig; | ||
mergeEnvironmentConfig: (...configs: ArrayAtLeastOne<MergedEnvironmentConfig, EnvironmentConfig>) => MergedEnvironmentConfig; | ||
}; | ||
@@ -108,3 +108,3 @@ export type ModifyRsbuildConfigFn = (config: RsbuildConfig, utils: ModifyRsbuildConfigUtils) => MaybePromise<RsbuildConfig | void>; | ||
environment: EnvironmentContext; | ||
HtmlPlugin: typeof HtmlWebpackPlugin; | ||
HtmlPlugin: typeof HtmlRspackPlugin; | ||
}; | ||
@@ -111,0 +111,0 @@ interface PluginInstance { |
import type { RuleSetCondition } from '@rspack/core'; | ||
import type HtmlWebpackPlugin from 'html-rspack-plugin'; | ||
import type RspackChain from '../../compiled/rspack-chain'; | ||
@@ -11,2 +10,3 @@ import type { RuleSetRule, Configuration as WebpackConfig, WebpackPluginInstance } from 'webpack'; | ||
import type { RspackConfig, RspackSourceMap } from './rspack'; | ||
import type { HtmlRspackPlugin } from './thirdParty'; | ||
import type { Falsy } from './utils'; | ||
@@ -34,3 +34,3 @@ import type { MaybePromise } from './utils'; | ||
*/ | ||
HtmlWebpackPlugin: typeof HtmlWebpackPlugin; | ||
HtmlWebpackPlugin: typeof HtmlRspackPlugin; | ||
}; | ||
@@ -83,3 +83,6 @@ export type ModifyWebpackConfigUtils = ModifyWebpackChainUtils & { | ||
}; | ||
export type RsbuildPlugins = (RsbuildPlugin | Falsy | Promise<RsbuildPlugin | Falsy>)[]; | ||
type LooseRsbuildPlugin = Omit<RsbuildPlugin, 'setup'> & { | ||
setup: (api: any) => MaybePromise<void>; | ||
}; | ||
export type RsbuildPlugins = (LooseRsbuildPlugin | Falsy | Promise<LooseRsbuildPlugin | Falsy>)[]; | ||
export type GetRsbuildConfig = { | ||
@@ -86,0 +89,0 @@ (): Readonly<RsbuildConfig>; |
import type { CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions } from '@rspack/core'; | ||
import type Autoprefixer from '../../compiled/autoprefixer'; | ||
import type HtmlRspackPlugin from 'html-rspack-plugin'; | ||
import type { AcceptedPlugin, ProcessOptions } from 'postcss'; | ||
import type { Configuration as WebpackConfig } from 'webpack'; | ||
import type { Rspack } from './rspack'; | ||
export type { HtmlRspackPlugin }; | ||
type AutoprefixerOptions = Autoprefixer.Options; | ||
@@ -7,0 +9,0 @@ export interface CSSExtractOptions { |
{ | ||
"name": "@rsbuild/core", | ||
"version": "1.0.0-alpha.7", | ||
"version": "1.0.0-alpha.8", | ||
"description": "The Rspack-based build tool.", | ||
@@ -50,6 +50,6 @@ "homepage": "https://rsbuild.dev", | ||
"@rspack/core": "1.0.0-alpha.2", | ||
"@rspack/lite-tapable": "1.0.0-alpha.2", | ||
"@swc/helpers": "0.5.11", | ||
"caniuse-lite": "^1.0.30001640", | ||
"core-js": "~3.37.1", | ||
"html-rspack-plugin": "6.0.0-beta.5", | ||
"postcss": "^8.4.39" | ||
@@ -76,2 +76,3 @@ }, | ||
"fs-extra": "^11.2.0", | ||
"html-rspack-plugin": "6.0.0-beta.7", | ||
"http-compression": "1.0.20", | ||
@@ -78,0 +79,0 @@ "http-proxy-middleware": "^2.0.6", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
6104157
262
118297
43
193
- Removedhtml-rspack-plugin@6.0.0-beta.5
- Removedhtml-rspack-plugin@6.0.0-beta.5(transitive)