@ms-cloudpack/bundler-rspack 0.3.6 → 0.3.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspackCapabilities.d.ts","sourceRoot":"","sources":["../src/rspackCapabilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"rspackCapabilities.d.ts","sourceRoot":"","sources":["../src/rspackCapabilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,eAAO,MAAM,kBAAkB,EAAE,wCAAwC,CAAC,aAAa,CAsCtF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { webExtensions } from '@ms-cloudpack/bundler-capabilities';
|
|
2
|
+
import { DefinePlugin } from '@rspack/core'; // added
|
|
2
3
|
export const rspackCapabilities = {
|
|
3
4
|
'asset-inline': (config, options) => {
|
|
4
5
|
// Remove the leading dot from the extensions
|
|
@@ -30,6 +31,11 @@ export const rspackCapabilities = {
|
|
|
30
31
|
config.resolve.extensions.unshift(...webExtensions);
|
|
31
32
|
return config;
|
|
32
33
|
},
|
|
34
|
+
define: (config, options) => {
|
|
35
|
+
config.plugins ??= [];
|
|
36
|
+
config.plugins.push(new DefinePlugin(options));
|
|
37
|
+
return config;
|
|
38
|
+
},
|
|
33
39
|
// This is a placeholder for the density capability. It doesn't do anything in the bundler.
|
|
34
40
|
// It's just a workaround for a post-bundle task. This will be replaced with 'plugins' in the future.
|
|
35
41
|
density: (config) => config,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspackCapabilities.js","sourceRoot":"","sources":["../src/rspackCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"rspackCapabilities.js","sourceRoot":"","sources":["../src/rspackCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC,CAAC,QAAQ;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAA4D;IACzF,cAAc,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;QAClC,6CAA6C;QAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/F,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC;QACrB,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,IAAI,MAAM,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC;YACtD,IAAI,EAAE,cAAc;SACrB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;QACzB,qEAAqE;QACrE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtB,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;QACxB,CAAC;aAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC;QACD,+DAA+D;QAC/D,qEAAqE;QACrE,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,wBAAwB,EAAE,CAAC,MAAM,EAAE,EAAE;QACnC,MAAM,CAAC,OAAO,KAAK,EAAE,CAAC;QACtB,MAAM,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE,CAAC;QACjC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;QAC1B,MAAM,CAAC,OAAO,KAAK,EAAE,CAAC;QACtB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,2FAA2F;IAC3F,qGAAqG;IACrG,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM;CAC5B,CAAC","sourcesContent":["import { webExtensions } from '@ms-cloudpack/bundler-capabilities';\nimport type { InternalBundlerCapabilityImplementations } from '@ms-cloudpack/common-types';\nimport type { Configuration } from '@rspack/core';\nimport { DefinePlugin } from '@rspack/core'; // added\n\nexport const rspackCapabilities: InternalBundlerCapabilityImplementations<Configuration> = {\n 'asset-inline': (config, options) => {\n // Remove the leading dot from the extensions\n const extensions = options.extensions.map((ext) => (ext.startsWith('.') ? ext.slice(1) : ext));\n config.module ??= {};\n config.module.rules ??= [];\n config.module.rules.push({\n test: new RegExp(`\\\\.(${extensions.join('|')})$`, 'i'),\n type: 'asset/inline',\n });\n return config;\n },\n alias: (config, options) => {\n // Add aliases for externalized packages to the webpack configuration\n if (!config.externals) {\n config.externals = [];\n } else if (!Array.isArray(config.externals)) {\n config.externals = [config.externals];\n }\n // The aliased packaged must be the first element in the array,\n // so that it is resolved before all other packages are externalized.\n config.externals.unshift(options);\n return config;\n },\n 'resolve-web-extensions': (config) => {\n config.resolve ??= {};\n config.resolve.extensions ??= [];\n config.resolve.extensions.unshift(...webExtensions);\n return config;\n },\n define: (config, options) => {\n config.plugins ??= [];\n config.plugins.push(new DefinePlugin(options));\n return config;\n },\n // This is a placeholder for the density capability. It doesn't do anything in the bundler.\n // It's just a workaround for a post-bundle task. This will be replaced with 'plugins' in the future.\n density: (config) => config,\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/bundler-rspack",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "A cloudpack plugin for abstracting rspack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ms-cloudpack/bundler-capabilities": "^0.
|
|
18
|
-
"@ms-cloudpack/bundler-utilities": "^0.5.
|
|
19
|
-
"@ms-cloudpack/common-types": "^0.27.
|
|
20
|
-
"@ms-cloudpack/esm-stub-utilities": "^0.15.
|
|
17
|
+
"@ms-cloudpack/bundler-capabilities": "^0.3.1",
|
|
18
|
+
"@ms-cloudpack/bundler-utilities": "^0.5.8",
|
|
19
|
+
"@ms-cloudpack/common-types": "^0.27.6",
|
|
20
|
+
"@ms-cloudpack/esm-stub-utilities": "^0.15.14",
|
|
21
21
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
22
|
-
"@ms-cloudpack/path-utilities": "^3.1.
|
|
22
|
+
"@ms-cloudpack/path-utilities": "^3.1.21",
|
|
23
23
|
"@rspack/core": "^1.1.8 || ^1.1.8-beta.0",
|
|
24
24
|
"@swc/core": "^1.3.0",
|
|
25
25
|
"css-loader": "^7.0.0",
|