@rsbuild/plugin-stylus 0.7.9 → 1.0.0-alpha.0

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
@@ -34,14 +34,15 @@ __export(src_exports, {
34
34
  pluginStylus: () => pluginStylus
35
35
  });
36
36
  module.exports = __toCommonJS(src_exports);
37
+ var import_core = require("@rsbuild/core");
37
38
  var import_shared = require("@rsbuild/shared");
38
39
  var PLUGIN_STYLUS_NAME = "rsbuild:stylus";
39
40
  var pluginStylus = (options) => ({
40
41
  name: PLUGIN_STYLUS_NAME,
41
42
  setup(api) {
42
- api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
43
- const config = api.getNormalizedConfig();
44
- const mergedOptions = (0, import_shared.reduceConfigs)({
43
+ api.modifyBundlerChain(async (chain, { CHAIN_ID, environment }) => {
44
+ const { config } = environment;
45
+ const mergedOptions = (0, import_core.reduceConfigs)({
45
46
  initial: {
46
47
  sourceMap: config.output.sourceMap.css
47
48
  },
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { RsbuildPlugin } from '@rsbuild/core';
2
-
3
- declare const PLUGIN_STYLUS_NAME = "rsbuild:stylus";
1
+ import { type RsbuildPlugin } from '@rsbuild/core';
2
+ export declare const PLUGIN_STYLUS_NAME = "rsbuild:stylus";
4
3
  type StylusOptions = {
5
4
  use?: string[];
6
5
  include?: string;
@@ -9,7 +8,7 @@ type StylusOptions = {
9
8
  lineNumbers?: boolean;
10
9
  hoistAtrules?: boolean;
11
10
  };
12
- type PluginStylusOptions = {
11
+ export type PluginStylusOptions = {
13
12
  /**
14
13
  * Options passed to Stylus.
15
14
  */
@@ -19,6 +18,5 @@ type PluginStylusOptions = {
19
18
  */
20
19
  sourceMap?: boolean;
21
20
  };
22
- declare const pluginStylus: (options?: PluginStylusOptions) => RsbuildPlugin;
23
-
24
- export { PLUGIN_STYLUS_NAME, type PluginStylusOptions, pluginStylus };
21
+ export declare const pluginStylus: (options?: PluginStylusOptions) => RsbuildPlugin;
22
+ export {};
package/dist/index.js CHANGED
@@ -9,18 +9,19 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
9
9
  throw Error('Dynamic require of "' + x + '" is not supported');
10
10
  });
11
11
 
12
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
12
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.54.5_eslint@9.6.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
13
13
  import { fileURLToPath } from "url";
14
14
  import path from "path";
15
15
 
16
16
  // src/index.ts
17
- import { cloneDeep, deepmerge, reduceConfigs } from "@rsbuild/shared";
17
+ import { reduceConfigs } from "@rsbuild/core";
18
+ import { cloneDeep, deepmerge } from "@rsbuild/shared";
18
19
  var PLUGIN_STYLUS_NAME = "rsbuild:stylus";
19
20
  var pluginStylus = (options) => ({
20
21
  name: PLUGIN_STYLUS_NAME,
21
22
  setup(api) {
22
- api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
23
- const config = api.getNormalizedConfig();
23
+ api.modifyBundlerChain(async (chain, { CHAIN_ID, environment }) => {
24
+ const { config } = environment;
24
25
  const mergedOptions = reduceConfigs({
25
26
  initial: {
26
27
  sourceMap: config.output.sourceMap.css
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-stylus",
3
- "version": "0.7.9",
3
+ "version": "1.0.0-alpha.0",
4
4
  "description": "Stylus plugin for Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -25,15 +25,15 @@
25
25
  "dependencies": {
26
26
  "stylus": "0.63.0",
27
27
  "stylus-loader": "8.1.0",
28
- "@rsbuild/shared": "0.7.9"
28
+ "@rsbuild/shared": "1.0.0-alpha.0"
29
29
  },
30
30
  "devDependencies": {
31
- "typescript": "^5.4.2",
32
- "@rsbuild/core": "0.7.9",
33
- "@scripts/test-helper": "0.7.9"
31
+ "typescript": "^5.5.2",
32
+ "@rsbuild/core": "1.0.0-alpha.0",
33
+ "@scripts/test-helper": "1.0.0-alpha.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@rsbuild/core": "^0.7.9"
36
+ "@rsbuild/core": "^1.0.0-alpha.0"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public",