@rsbuild/core 0.0.0-nightly-20231017024751

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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/dist/createBuilder.d.ts +2 -0
  4. package/dist/createBuilder.js +51 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +21 -0
  7. package/dist/plugins/antd.d.ts +3 -0
  8. package/dist/plugins/antd.js +56 -0
  9. package/dist/plugins/arco.d.ts +2 -0
  10. package/dist/plugins/arco.js +44 -0
  11. package/dist/plugins/asset.d.ts +2 -0
  12. package/dist/plugins/asset.js +36 -0
  13. package/dist/plugins/assetsRetry.d.ts +2 -0
  14. package/dist/plugins/assetsRetry.js +77 -0
  15. package/dist/plugins/bundleAnalyzer.d.ts +2 -0
  16. package/dist/plugins/bundleAnalyzer.js +72 -0
  17. package/dist/plugins/cache.d.ts +2 -0
  18. package/dist/plugins/cache.js +147 -0
  19. package/dist/plugins/checkSyntax.d.ts +2 -0
  20. package/dist/plugins/checkSyntax.js +86 -0
  21. package/dist/plugins/cleanOutput.d.ts +2 -0
  22. package/dist/plugins/cleanOutput.js +65 -0
  23. package/dist/plugins/define.d.ts +2 -0
  24. package/dist/plugins/define.js +79 -0
  25. package/dist/plugins/devtool.d.ts +2 -0
  26. package/dist/plugins/devtool.js +26 -0
  27. package/dist/plugins/entry.d.ts +2 -0
  28. package/dist/plugins/entry.js +30 -0
  29. package/dist/plugins/externals.d.ts +2 -0
  30. package/dist/plugins/externals.js +31 -0
  31. package/dist/plugins/fileSize.d.ts +4 -0
  32. package/dist/plugins/fileSize.js +188 -0
  33. package/dist/plugins/html.d.ts +3 -0
  34. package/dist/plugins/html.js +261 -0
  35. package/dist/plugins/index.d.ts +2 -0
  36. package/dist/plugins/index.js +83 -0
  37. package/dist/plugins/inlineChunk.d.ts +2 -0
  38. package/dist/plugins/inlineChunk.js +95 -0
  39. package/dist/plugins/moment.d.ts +2 -0
  40. package/dist/plugins/moment.js +26 -0
  41. package/dist/plugins/networkPerformance.d.ts +2 -0
  42. package/dist/plugins/networkPerformance.js +37 -0
  43. package/dist/plugins/nodeAddons.d.ts +2 -0
  44. package/dist/plugins/nodeAddons.js +86 -0
  45. package/dist/plugins/performance.d.ts +5 -0
  46. package/dist/plugins/performance.js +49 -0
  47. package/dist/plugins/preloadOrPrefetch.d.ts +2 -0
  48. package/dist/plugins/preloadOrPrefetch.js +40 -0
  49. package/dist/plugins/rem.d.ts +2 -0
  50. package/dist/plugins/rem.js +124 -0
  51. package/dist/plugins/splitChunks.d.ts +4 -0
  52. package/dist/plugins/splitChunks.js +275 -0
  53. package/dist/plugins/startUrl.d.ts +3 -0
  54. package/dist/plugins/startUrl.js +111 -0
  55. package/dist/plugins/svg.d.ts +2 -0
  56. package/dist/plugins/svg.js +67 -0
  57. package/dist/plugins/target.d.ts +2 -0
  58. package/dist/plugins/target.js +56 -0
  59. package/dist/plugins/toml.d.ts +2 -0
  60. package/dist/plugins/toml.js +19 -0
  61. package/dist/plugins/wasm.d.ts +2 -0
  62. package/dist/plugins/wasm.js +34 -0
  63. package/dist/plugins/yaml.d.ts +2 -0
  64. package/dist/plugins/yaml.js +19 -0
  65. package/package.json +49 -0
@@ -0,0 +1,2 @@
1
+ import { DefaultBuilderPlugin } from '@rsbuild/shared';
2
+ export declare const builderPluginToml: () => DefaultBuilderPlugin;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "builderPluginToml", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return builderPluginToml;
9
+ }
10
+ });
11
+ const _shared = require("@rsbuild/shared");
12
+ const builderPluginToml = () => ({
13
+ name: "builder-plugin-toml",
14
+ setup(api) {
15
+ api.modifyBundlerChain((chain, { CHAIN_ID }) => {
16
+ chain.module.rule(CHAIN_ID.RULE.TOML).type("javascript/auto").test(/\.toml$/).use(CHAIN_ID.USE.TOML).loader((0, _shared.getSharedPkgCompiledPath)("toml-loader"));
17
+ });
18
+ }
19
+ });
@@ -0,0 +1,2 @@
1
+ import { type DefaultBuilderPlugin } from '@rsbuild/shared';
2
+ export declare const builderPluginWasm: () => DefaultBuilderPlugin;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "builderPluginWasm", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return builderPluginWasm;
9
+ }
10
+ });
11
+ const _path = require("path");
12
+ const _shared = require("@rsbuild/shared");
13
+ const builderPluginWasm = () => ({
14
+ name: "builder-plugin-wasm",
15
+ setup(api) {
16
+ api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
17
+ const config = api.getNormalizedConfig();
18
+ const distPath = (0, _shared.getDistPath)(config.output, "wasm");
19
+ chain.experiments({
20
+ ...chain.get("experiments"),
21
+ asyncWebAssembly: true
22
+ });
23
+ const wasmFilename = (0, _path.join)(distPath, "[hash].module.wasm");
24
+ chain.output.merge({
25
+ webassemblyModuleFilename: wasmFilename
26
+ });
27
+ chain.module.rule(CHAIN_ID.RULE.WASM).test(/\.wasm$/).merge({
28
+ dependency: "url"
29
+ }).type("asset/resource").set("generator", {
30
+ filename: wasmFilename
31
+ });
32
+ });
33
+ }
34
+ });
@@ -0,0 +1,2 @@
1
+ import { DefaultBuilderPlugin } from '@rsbuild/shared';
2
+ export declare const builderPluginYaml: () => DefaultBuilderPlugin;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "builderPluginYaml", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return builderPluginYaml;
9
+ }
10
+ });
11
+ const _shared = require("@rsbuild/shared");
12
+ const builderPluginYaml = () => ({
13
+ name: "builder-plugin-yaml",
14
+ setup(api) {
15
+ api.modifyBundlerChain((chain, { CHAIN_ID }) => {
16
+ chain.module.rule(CHAIN_ID.RULE.YAML).type("javascript/auto").test(/\.ya?ml$/).use(CHAIN_ID.USE.YAML).loader((0, _shared.getSharedPkgCompiledPath)("yaml-loader"));
17
+ });
18
+ }
19
+ });
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@rsbuild/core",
3
+ "description": "Unleash the power of Rspack with the out-of-the-box build tool.",
4
+ "homepage": "https://rsbuild.dev",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/web-infra-dev/rsbuild",
8
+ "directory": "packages/rsbuild"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/web-infra-dev/rsbuild/issues"
12
+ },
13
+ "engines": {
14
+ "node": ">=14.0.0"
15
+ },
16
+ "license": "MIT",
17
+ "version": "0.0.0-nightly-20231017024751",
18
+ "types": "./dist/index.d.ts",
19
+ "main": "./dist/index.js",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ }
25
+ },
26
+ "files": [
27
+ "bin",
28
+ "dist"
29
+ ],
30
+ "publishConfig": {
31
+ "registry": "https://registry.npmjs.org/",
32
+ "access": "public",
33
+ "provenance": true
34
+ },
35
+ "dependencies": {
36
+ "@modern-js/utils": "2.26.0",
37
+ "webpack": "^5.88.1",
38
+ "@svgr/webpack": "8.0.1",
39
+ "@rsbuild/shared": "0.0.0-nightly-20231017024751"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^16",
43
+ "typescript": "^5"
44
+ },
45
+ "scripts": {
46
+ "dev": "modern build --watch",
47
+ "build": "modern build"
48
+ }
49
+ }