@rsbuild/plugin-preact 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
@@ -24,7 +24,6 @@ __export(src_exports, {
24
24
  pluginPreact: () => pluginPreact
25
25
  });
26
26
  module.exports = __toCommonJS(src_exports);
27
- var import_shared = require("@rsbuild/shared");
28
27
  var PLUGIN_PREACT_NAME = "rsbuild:preact";
29
28
  var pluginPreact = (options = {}) => ({
30
29
  name: PLUGIN_PREACT_NAME,
@@ -32,7 +31,7 @@ var pluginPreact = (options = {}) => ({
32
31
  const { reactAliasesEnabled = true } = options;
33
32
  api.modifyRsbuildConfig((userConfig, { mergeRsbuildConfig }) => {
34
33
  const reactOptions = {
35
- development: (0, import_shared.getNodeEnv)() === "development",
34
+ development: process.env.NODE_ENV === "development",
36
35
  runtime: "automatic",
37
36
  importSource: "preact"
38
37
  };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,10 @@
1
- import { RsbuildPlugin } from '@rsbuild/core';
2
-
3
- type PluginPreactOptions = {
1
+ import type { RsbuildPlugin } from '@rsbuild/core';
2
+ export type PluginPreactOptions = {
4
3
  /**
5
4
  * Whether to aliases `react`, `react-dom` to `preact/compat`
6
5
  * @default true
7
6
  */
8
7
  reactAliasesEnabled?: boolean;
9
8
  };
10
- declare const PLUGIN_PREACT_NAME = "rsbuild:preact";
11
- declare const pluginPreact: (options?: PluginPreactOptions) => RsbuildPlugin;
12
-
13
- export { PLUGIN_PREACT_NAME, type PluginPreactOptions, pluginPreact };
9
+ export declare const PLUGIN_PREACT_NAME = "rsbuild:preact";
10
+ export declare const pluginPreact: (options?: PluginPreactOptions) => RsbuildPlugin;
package/dist/index.js CHANGED
@@ -2,12 +2,11 @@ import { createRequire } from 'module';
2
2
  var require = createRequire(import.meta['url']);
3
3
 
4
4
 
5
- // ../../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
5
+ // ../../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
6
6
  import { fileURLToPath } from "url";
7
7
  import path from "path";
8
8
 
9
9
  // src/index.ts
10
- import { getNodeEnv } from "@rsbuild/shared";
11
10
  var PLUGIN_PREACT_NAME = "rsbuild:preact";
12
11
  var pluginPreact = (options = {}) => ({
13
12
  name: PLUGIN_PREACT_NAME,
@@ -15,7 +14,7 @@ var pluginPreact = (options = {}) => ({
15
14
  const { reactAliasesEnabled = true } = options;
16
15
  api.modifyRsbuildConfig((userConfig, { mergeRsbuildConfig }) => {
17
16
  const reactOptions = {
18
- development: getNodeEnv() === "development",
17
+ development: process.env.NODE_ENV === "development",
19
18
  runtime: "automatic",
20
19
  importSource: "preact"
21
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-preact",
3
- "version": "0.7.9",
3
+ "version": "1.0.0-alpha.0",
4
4
  "description": "Preact plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,16 +21,13 @@
21
21
  "files": [
22
22
  "dist"
23
23
  ],
24
- "dependencies": {
25
- "@rsbuild/shared": "0.7.9"
26
- },
27
24
  "devDependencies": {
28
25
  "@types/node": "18.x",
29
- "typescript": "^5.4.2",
30
- "@rsbuild/core": "0.7.9"
26
+ "typescript": "^5.5.2",
27
+ "@rsbuild/core": "1.0.0-alpha.0"
31
28
  },
32
29
  "peerDependencies": {
33
- "@rsbuild/core": "^0.7.9"
30
+ "@rsbuild/core": "^1.0.0-alpha.0"
34
31
  },
35
32
  "publishConfig": {
36
33
  "access": "public",