@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.
- package/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/createBuilder.d.ts +2 -0
- package/dist/createBuilder.js +51 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/plugins/antd.d.ts +3 -0
- package/dist/plugins/antd.js +56 -0
- package/dist/plugins/arco.d.ts +2 -0
- package/dist/plugins/arco.js +44 -0
- package/dist/plugins/asset.d.ts +2 -0
- package/dist/plugins/asset.js +36 -0
- package/dist/plugins/assetsRetry.d.ts +2 -0
- package/dist/plugins/assetsRetry.js +77 -0
- package/dist/plugins/bundleAnalyzer.d.ts +2 -0
- package/dist/plugins/bundleAnalyzer.js +72 -0
- package/dist/plugins/cache.d.ts +2 -0
- package/dist/plugins/cache.js +147 -0
- package/dist/plugins/checkSyntax.d.ts +2 -0
- package/dist/plugins/checkSyntax.js +86 -0
- package/dist/plugins/cleanOutput.d.ts +2 -0
- package/dist/plugins/cleanOutput.js +65 -0
- package/dist/plugins/define.d.ts +2 -0
- package/dist/plugins/define.js +79 -0
- package/dist/plugins/devtool.d.ts +2 -0
- package/dist/plugins/devtool.js +26 -0
- package/dist/plugins/entry.d.ts +2 -0
- package/dist/plugins/entry.js +30 -0
- package/dist/plugins/externals.d.ts +2 -0
- package/dist/plugins/externals.js +31 -0
- package/dist/plugins/fileSize.d.ts +4 -0
- package/dist/plugins/fileSize.js +188 -0
- package/dist/plugins/html.d.ts +3 -0
- package/dist/plugins/html.js +261 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.js +83 -0
- package/dist/plugins/inlineChunk.d.ts +2 -0
- package/dist/plugins/inlineChunk.js +95 -0
- package/dist/plugins/moment.d.ts +2 -0
- package/dist/plugins/moment.js +26 -0
- package/dist/plugins/networkPerformance.d.ts +2 -0
- package/dist/plugins/networkPerformance.js +37 -0
- package/dist/plugins/nodeAddons.d.ts +2 -0
- package/dist/plugins/nodeAddons.js +86 -0
- package/dist/plugins/performance.d.ts +5 -0
- package/dist/plugins/performance.js +49 -0
- package/dist/plugins/preloadOrPrefetch.d.ts +2 -0
- package/dist/plugins/preloadOrPrefetch.js +40 -0
- package/dist/plugins/rem.d.ts +2 -0
- package/dist/plugins/rem.js +124 -0
- package/dist/plugins/splitChunks.d.ts +4 -0
- package/dist/plugins/splitChunks.js +275 -0
- package/dist/plugins/startUrl.d.ts +3 -0
- package/dist/plugins/startUrl.js +111 -0
- package/dist/plugins/svg.d.ts +2 -0
- package/dist/plugins/svg.js +67 -0
- package/dist/plugins/target.d.ts +2 -0
- package/dist/plugins/target.js +56 -0
- package/dist/plugins/toml.d.ts +2 -0
- package/dist/plugins/toml.js +19 -0
- package/dist/plugins/wasm.d.ts +2 -0
- package/dist/plugins/wasm.js +34 -0
- package/dist/plugins/yaml.d.ts +2 -0
- package/dist/plugins/yaml.js +19 -0
- package/package.json +49 -0
|
@@ -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,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,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
|
+
}
|