@rsbuild/core 0.7.0-beta.7 → 0.7.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -36,16 +36,13 @@ var __publicField = (obj, key, value) => {
36
36
  };
37
37
 
38
38
  // src/constants.ts
39
- var import_node_path, PLUGIN_SWC_NAME, PLUGIN_CSS_NAME, PLUGIN_LESS_NAME, PLUGIN_SASS_NAME, PLUGIN_STYLUS_NAME, LOADER_PATH, STATIC_PATH, COMPILED_PATH, TS_CONFIG_FILE, HTML_REGEX, CSS_REGEX;
39
+ var import_node_path, PLUGIN_SWC_NAME, PLUGIN_CSS_NAME, LOADER_PATH, STATIC_PATH, COMPILED_PATH, TS_CONFIG_FILE, HTML_REGEX, CSS_REGEX;
40
40
  var init_constants = __esm({
41
41
  "src/constants.ts"() {
42
42
  "use strict";
43
43
  import_node_path = require("path");
44
44
  PLUGIN_SWC_NAME = "rsbuild:swc";
45
45
  PLUGIN_CSS_NAME = "rsbuild:css";
46
- PLUGIN_LESS_NAME = "rsbuild:less";
47
- PLUGIN_SASS_NAME = "rsbuild:sass";
48
- PLUGIN_STYLUS_NAME = "rsbuild:stylus";
49
46
  LOADER_PATH = (0, import_node_path.join)(__dirname);
50
47
  STATIC_PATH = (0, import_node_path.join)(__dirname, "../static");
51
48
  COMPILED_PATH = (0, import_node_path.join)(__dirname, "../compiled");
@@ -1043,7 +1040,7 @@ async function createContextByConfig(options, bundlerType, config = {}) {
1043
1040
  const context = {
1044
1041
  entry: getEntryObject(config, "web"),
1045
1042
  targets: config.output?.targets || [],
1046
- version: "0.7.0-beta.7",
1043
+ version: "0.7.0-beta.8",
1047
1044
  rootPath,
1048
1045
  distPath,
1049
1046
  cachePath,
@@ -2064,7 +2061,6 @@ var init_html = __esm({
2064
2061
  var css_exports = {};
2065
2062
  __export(css_exports, {
2066
2063
  applyAutoprefixer: () => applyAutoprefixer,
2067
- applyCSSRule: () => applyCSSRule,
2068
2064
  enableNativeCss: () => enableNativeCss,
2069
2065
  isUseCssExtract: () => isUseCssExtract,
2070
2066
  normalizeCssLoaderOptions: () => normalizeCssLoaderOptions,
@@ -6710,9 +6706,6 @@ var init_init = __esm({
6710
6706
  var src_exports = {};
6711
6707
  __export(src_exports, {
6712
6708
  PLUGIN_CSS_NAME: () => PLUGIN_CSS_NAME,
6713
- PLUGIN_LESS_NAME: () => PLUGIN_LESS_NAME,
6714
- PLUGIN_SASS_NAME: () => PLUGIN_SASS_NAME,
6715
- PLUGIN_STYLUS_NAME: () => PLUGIN_STYLUS_NAME,
6716
6709
  PLUGIN_SWC_NAME: () => PLUGIN_SWC_NAME,
6717
6710
  __internalHelper: () => internal_exports,
6718
6711
  createRsbuild: () => createRsbuild,
@@ -6730,7 +6723,6 @@ var import_core10 = require("@rspack/core");
6730
6723
  // src/internal.ts
6731
6724
  var internal_exports = {};
6732
6725
  __export(internal_exports, {
6733
- applyCSSRule: () => applyCSSRule,
6734
6726
  applySwcDecoratorConfig: () => applySwcDecoratorConfig,
6735
6727
  createContext: () => createContext,
6736
6728
  createDevServer: () => createDevServer,
@@ -6773,7 +6765,7 @@ var applyServerOptions = (command) => {
6773
6765
  command.option("-o --open [url]", "open the page in browser on startup").option("--port <port>", "specify a port number for server to listen").option("--host <host>", "specify the host that the server listens to");
6774
6766
  };
6775
6767
  function runCli() {
6776
- import_commander.program.name("rsbuild").usage("<command> [options]").version("0.7.0-beta.7");
6768
+ import_commander.program.name("rsbuild").usage("<command> [options]").version("0.7.0-beta.8");
6777
6769
  const devCommand = import_commander.program.command("dev");
6778
6770
  const buildCommand = import_commander.program.command("build");
6779
6771
  const previewCommand = import_commander.program.command("preview");
@@ -6853,7 +6845,7 @@ function prepareCli() {
6853
6845
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
6854
6846
  console.log();
6855
6847
  }
6856
- import_shared60.logger.greet(` ${`Rsbuild v${"0.7.0-beta.7"}`}
6848
+ import_shared60.logger.greet(` ${`Rsbuild v${"0.7.0-beta.8"}`}
6857
6849
  `);
6858
6850
  }
6859
6851
 
@@ -6862,7 +6854,6 @@ init_createContext();
6862
6854
  init_pluginManager();
6863
6855
  init_initHooks();
6864
6856
  init_initConfigs();
6865
- init_css();
6866
6857
  init_initPlugins();
6867
6858
  init_pluginHelper();
6868
6859
  init_helpers();
@@ -6885,13 +6876,10 @@ init_config();
6885
6876
  var import_shared61 = require("@rsbuild/shared");
6886
6877
  init_mergeConfig();
6887
6878
  init_constants();
6888
- var version = "0.7.0-beta.7";
6879
+ var version = "0.7.0-beta.8";
6889
6880
  // Annotate the CommonJS export names for ESM import in node:
6890
6881
  0 && (module.exports = {
6891
6882
  PLUGIN_CSS_NAME,
6892
- PLUGIN_LESS_NAME,
6893
- PLUGIN_SASS_NAME,
6894
- PLUGIN_STYLUS_NAME,
6895
6883
  PLUGIN_SWC_NAME,
6896
6884
  __internalHelper,
6897
6885
  createRsbuild,
package/dist/index.js CHANGED
@@ -39,16 +39,13 @@ var init_esm = __esm({
39
39
 
40
40
  // src/constants.ts
41
41
  import { join } from "path";
42
- var PLUGIN_SWC_NAME, PLUGIN_CSS_NAME, PLUGIN_LESS_NAME, PLUGIN_SASS_NAME, PLUGIN_STYLUS_NAME, LOADER_PATH, STATIC_PATH, COMPILED_PATH, TS_CONFIG_FILE, HTML_REGEX, CSS_REGEX;
42
+ var PLUGIN_SWC_NAME, PLUGIN_CSS_NAME, LOADER_PATH, STATIC_PATH, COMPILED_PATH, TS_CONFIG_FILE, HTML_REGEX, CSS_REGEX;
43
43
  var init_constants = __esm({
44
44
  "src/constants.ts"() {
45
45
  "use strict";
46
46
  init_esm();
47
47
  PLUGIN_SWC_NAME = "rsbuild:swc";
48
48
  PLUGIN_CSS_NAME = "rsbuild:css";
49
- PLUGIN_LESS_NAME = "rsbuild:less";
50
- PLUGIN_SASS_NAME = "rsbuild:sass";
51
- PLUGIN_STYLUS_NAME = "rsbuild:stylus";
52
49
  LOADER_PATH = join(__dirname);
53
50
  STATIC_PATH = join(__dirname, "../static");
54
51
  COMPILED_PATH = join(__dirname, "../compiled");
@@ -1095,7 +1092,7 @@ async function createContextByConfig(options, bundlerType, config = {}) {
1095
1092
  const context = {
1096
1093
  entry: getEntryObject(config, "web"),
1097
1094
  targets: config.output?.targets || [],
1098
- version: "0.7.0-beta.7",
1095
+ version: "0.7.0-beta.8",
1099
1096
  rootPath,
1100
1097
  distPath,
1101
1098
  cachePath,
@@ -2144,7 +2141,6 @@ var init_html = __esm({
2144
2141
  var css_exports = {};
2145
2142
  __export(css_exports, {
2146
2143
  applyAutoprefixer: () => applyAutoprefixer,
2147
- applyCSSRule: () => applyCSSRule,
2148
2144
  enableNativeCss: () => enableNativeCss,
2149
2145
  isUseCssExtract: () => isUseCssExtract,
2150
2146
  normalizeCssLoaderOptions: () => normalizeCssLoaderOptions,
@@ -6961,7 +6957,6 @@ import { rspack as rspack10 } from "@rspack/core";
6961
6957
  // src/internal.ts
6962
6958
  var internal_exports = {};
6963
6959
  __export(internal_exports, {
6964
- applyCSSRule: () => applyCSSRule,
6965
6960
  applySwcDecoratorConfig: () => applySwcDecoratorConfig,
6966
6961
  createContext: () => createContext,
6967
6962
  createDevServer: () => createDevServer,
@@ -7006,7 +7001,7 @@ var applyServerOptions = (command) => {
7006
7001
  command.option("-o --open [url]", "open the page in browser on startup").option("--port <port>", "specify a port number for server to listen").option("--host <host>", "specify the host that the server listens to");
7007
7002
  };
7008
7003
  function runCli() {
7009
- program.name("rsbuild").usage("<command> [options]").version("0.7.0-beta.7");
7004
+ program.name("rsbuild").usage("<command> [options]").version("0.7.0-beta.8");
7010
7005
  const devCommand = program.command("dev");
7011
7006
  const buildCommand = program.command("build");
7012
7007
  const previewCommand = program.command("preview");
@@ -7087,7 +7082,7 @@ function prepareCli() {
7087
7082
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
7088
7083
  console.log();
7089
7084
  }
7090
- logger18.greet(` ${`Rsbuild v${"0.7.0-beta.7"}`}
7085
+ logger18.greet(` ${`Rsbuild v${"0.7.0-beta.8"}`}
7091
7086
  `);
7092
7087
  }
7093
7088
 
@@ -7096,7 +7091,6 @@ init_createContext();
7096
7091
  init_pluginManager();
7097
7092
  init_initHooks();
7098
7093
  init_initConfigs();
7099
- init_css();
7100
7094
  init_initPlugins();
7101
7095
  init_pluginHelper();
7102
7096
  init_helpers();
@@ -7120,12 +7114,9 @@ init_config();
7120
7114
  init_mergeConfig();
7121
7115
  init_constants();
7122
7116
  import { logger as logger19 } from "@rsbuild/shared";
7123
- var version = "0.7.0-beta.7";
7117
+ var version = "0.7.0-beta.8";
7124
7118
  export {
7125
7119
  PLUGIN_CSS_NAME,
7126
- PLUGIN_LESS_NAME,
7127
- PLUGIN_SASS_NAME,
7128
- PLUGIN_STYLUS_NAME,
7129
7120
  PLUGIN_SWC_NAME,
7130
7121
  internal_exports as __internalHelper,
7131
7122
  createRsbuild,
@@ -1,8 +1,5 @@
1
1
  export declare const PLUGIN_SWC_NAME = "rsbuild:swc";
2
2
  export declare const PLUGIN_CSS_NAME = "rsbuild:css";
3
- export declare const PLUGIN_LESS_NAME = "rsbuild:less";
4
- export declare const PLUGIN_SASS_NAME = "rsbuild:sass";
5
- export declare const PLUGIN_STYLUS_NAME = "rsbuild:stylus";
6
3
  export declare const LOADER_PATH: string;
7
4
  export declare const STATIC_PATH: string;
8
5
  export declare const COMPILED_PATH: string;
@@ -13,7 +13,7 @@ export { rspack };
13
13
  export type { Rspack };
14
14
  export { logger } from '@rsbuild/shared';
15
15
  export { mergeRsbuildConfig } from './mergeConfig';
16
- export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME, PLUGIN_SASS_NAME, PLUGIN_LESS_NAME, PLUGIN_STYLUS_NAME, } from './constants';
16
+ export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME } from './constants';
17
17
  export type { RsbuildConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, ServerConfig, OutputConfig, SecurityConfig, PerformanceConfig, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedServerConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig, NormalizedModuleFederationConfig, RsbuildPlugin, RsbuildPlugins, RsbuildPluginAPI, } from './types';
18
18
  export type { RsbuildMode, RsbuildEntry, RsbuildTarget, RsbuildContext, RsbuildInstance, CreateRsbuildOptions, InspectConfigOptions, Minify, Polyfill, PrintUrls, PublicDir, Decorators, RspackRule, WatchFiles, CSSModules, CrossOrigin, ConsoleType, SplitChunks, BundlerChain, ClientConfig, ScriptInject, ChainedConfig, PostCSSPlugin, ScriptLoading, LegalComments, AliasStrategy, FilenameConfig, DistPathConfig, OutputStructure, ChainIdentifier, PreconnectOption, CSSLoaderOptions, ModifyChainUtils, StyleLoaderOptions, PostCSSLoaderOptions, ChainedConfigWithUtils, ModifyRspackConfigUtils, CSSModulesLocalsConvention, OnExitFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnBeforeCreateCompilerFn, OnCloseDevServerFn, OnDevCompileDoneFn, ModifyBundlerChainFn, ModifyRspackConfigFn, ModifyRsbuildConfigFn, TransformFn, TransformHandler, } from '@rsbuild/shared';
19
19
  export {
@@ -9,7 +9,6 @@ export { createContext, createPublicContext } from './createContext';
9
9
  export { initPlugins, createPluginManager } from './pluginManager';
10
10
  export { initHooks, type Hooks } from './initHooks';
11
11
  export { initRsbuildConfig } from './provider/initConfigs';
12
- export { applyCSSRule } from './plugins/css';
13
12
  export { getPluginAPI } from './initPlugins';
14
13
  export type { InternalContext } from './types';
15
14
  export { setHTMLPlugin, getHTMLPlugin, setCssExtractPlugin, } from './pluginHelper';
@@ -1,4 +1,4 @@
1
- import { type BundlerChainRule, type CSSLoaderOptions, type ModifyChainUtils, type RsbuildContext, type RsbuildTarget } from '@rsbuild/shared';
1
+ import { type CSSLoaderOptions, type RsbuildTarget } from '@rsbuild/shared';
2
2
  import type { AcceptedPlugin } from 'postcss';
3
3
  import type { NormalizedConfig, RsbuildPlugin } from '../types';
4
4
  export declare const enableNativeCss: (config: NormalizedConfig) => boolean;
@@ -9,11 +9,4 @@ export declare const normalizeCssLoaderOptions: (options: CSSLoaderOptions, expo
9
9
  * Check if autoprefixer is already in the plugins, if not, add it
10
10
  */
11
11
  export declare const applyAutoprefixer: (plugins: unknown[], browserslist: string[], config: NormalizedConfig) => Promise<AcceptedPlugin[]>;
12
- export declare function applyCSSRule({ rule, config, context, utils: { target, isProd, CHAIN_ID }, importLoaders, }: {
13
- rule: BundlerChainRule;
14
- config: NormalizedConfig;
15
- context: RsbuildContext;
16
- utils: ModifyChainUtils;
17
- importLoaders?: number;
18
- }): Promise<void>;
19
12
  export declare const pluginCss: () => RsbuildPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "0.7.0-beta.7",
3
+ "version": "0.7.0-beta.8",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -51,7 +51,7 @@
51
51
  "core-js": "~3.36.0",
52
52
  "html-webpack-plugin": "npm:html-rspack-plugin@5.7.2",
53
53
  "postcss": "^8.4.38",
54
- "@rsbuild/shared": "0.7.0-beta.7"
54
+ "@rsbuild/shared": "0.7.0-beta.8"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/fs-extra": "^11.0.4",