@nimbus-ds/webpack 1.5.0 → 1.6.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/CHANGELOG.md +6 -0
- package/dist/config/base.d.ts +8 -0
- package/dist/config/base.js +26 -1
- package/dist/config/base.js.map +1 -1
- package/dist/config/external.d.ts +24 -4
- package/dist/config/external.js +20 -3
- package/dist/config/external.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This package is intended for internal use in generating builds of each design system package. It contains all the necessary settings and dependencies to optimize the creation of our builds.
|
|
4
4
|
|
|
5
|
+
## 2025-08-01 `1.6.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Added `ProgressBar` component as an external package. ([#325](https://github.com/TiendaNube/nimbus-design-system/pull/325) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
5
11
|
## 2025-03-18 `1.5.0`
|
|
6
12
|
|
|
7
13
|
#### 🎉 New features
|
package/dist/config/base.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Configuration } from "webpack";
|
|
2
2
|
import { WebpackBaseConfig } from "../utils";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the final webpack configuration by merging the base configuration with
|
|
5
|
+
* environment-specific configurations (production or development).
|
|
6
|
+
*
|
|
7
|
+
* @param config - Additional webpack configuration to merge
|
|
8
|
+
* @param extraParams - Additional parameters for the base configuration
|
|
9
|
+
* @returns The final webpack configuration
|
|
10
|
+
*/
|
|
3
11
|
export declare const getConfiguration: (config?: Configuration, extraParams?: WebpackBaseConfig) => Configuration;
|
|
4
12
|
declare const _default: Configuration;
|
|
5
13
|
export default _default;
|
package/dist/config/base.js
CHANGED
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getConfiguration = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* Base webpack configuration for Nimbus Design System packages.
|
|
8
|
+
* This configuration is shared across all packages in the monorepo.
|
|
7
9
|
*/
|
|
8
10
|
const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
9
11
|
const utils_1 = require("../utils");
|
|
@@ -13,6 +15,14 @@ const alias_1 = require("./alias");
|
|
|
13
15
|
const external_1 = require("./external");
|
|
14
16
|
const production_1 = tslib_1.__importDefault(require("./production"));
|
|
15
17
|
const development_1 = tslib_1.__importDefault(require("./development"));
|
|
18
|
+
/**
|
|
19
|
+
* Creates the base webpack configuration for a package.
|
|
20
|
+
*
|
|
21
|
+
* @param dtsBundleConfig - Configuration for generating TypeScript declaration files
|
|
22
|
+
* @param packageJsonConfig - Package.json configuration for the current package
|
|
23
|
+
* @param useClientInjectionOptions - Options for client-side code injection
|
|
24
|
+
* @returns A webpack configuration object
|
|
25
|
+
*/
|
|
16
26
|
const webpack = ({ dtsBundleConfig, packageJsonConfig, useClientInjectionOptions, } = {}) => ({
|
|
17
27
|
target: "node",
|
|
18
28
|
mode: utils_1.isProduction ? "production" : "development",
|
|
@@ -39,8 +49,23 @@ const webpack = ({ dtsBundleConfig, packageJsonConfig, useClientInjectionOptions
|
|
|
39
49
|
alias: alias_1.aliasItems,
|
|
40
50
|
extensions: [".tsx", ".ts", ".js"],
|
|
41
51
|
},
|
|
52
|
+
/**
|
|
53
|
+
* External dependencies configuration.
|
|
54
|
+
*
|
|
55
|
+
* The `externals` field tells webpack which modules should be treated as external dependencies.
|
|
56
|
+
* These modules will not be bundled with the package but will be expected to be available
|
|
57
|
+
* in the runtime environment.
|
|
58
|
+
*/
|
|
42
59
|
externals: external_1.externalItems,
|
|
43
60
|
});
|
|
61
|
+
/**
|
|
62
|
+
* Gets the final webpack configuration by merging the base configuration with
|
|
63
|
+
* environment-specific configurations (production or development).
|
|
64
|
+
*
|
|
65
|
+
* @param config - Additional webpack configuration to merge
|
|
66
|
+
* @param extraParams - Additional parameters for the base configuration
|
|
67
|
+
* @returns The final webpack configuration
|
|
68
|
+
*/
|
|
44
69
|
const getConfiguration = (config, extraParams) => utils_1.isProduction
|
|
45
70
|
? (0, webpack_merge_1.default)(webpack(extraParams), production_1.default, config || {})
|
|
46
71
|
: (0, webpack_merge_1.default)(webpack(), development_1.default, config || {});
|
package/dist/config/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/config/base.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/config/base.ts"],"names":[],"mappings":";;;;AAAA;;;;GAIG;AACH,0EAAkC;AAGlC,oCAA6E;AAC7E,oCAAmD;AACnD,wCAIoB;AACpB,mCAAqC;AACrC,yCAA2C;AAE3C,sEAAsC;AACtC,wEAAwC;AAExC;;;;;;;GAOG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,eAAe,EACf,iBAAiB,EACjB,yBAAyB,MACJ,EAAE,EAAiB,EAAE,CAAC,CAAC;IAC5C,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,oBAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;IACjD,KAAK,EAAE;QACL,SAAS,EAAE,gBAAgB;KAC5B;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CACrB,QAAQ,CAAC,KAAK,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB;QACtE,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;YAC9B,IAAI,EAAE,KAAK;SACZ;QACD,aAAa,EAAE,KAAK;KACrB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,IAAA,wBAAgB,EAAC,CAAC,sBAAc,EAAE,eAAO,CAAC,CAAC;KACnD;IACD,OAAO,EAAE;QACP,IAAA,kCAAwB,EAAC,eAAe,CAAC;QACzC,IAAI,uCAA6B,CAAC,iBAAiB,CAAC;QACpD,IAAI,kCAAwB,CAAC,yBAAyB,CAAC;KACxD;IACD,OAAO,EAAE;QACP,KAAK,EAAE,kBAAU;QACjB,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;KACnC;IACD;;;;;;OAMG;IACH,SAAS,EAAE,wBAAa;CACzB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACI,MAAM,gBAAgB,GAAG,CAC9B,MAAsB,EACtB,WAA+B,EAC/B,EAAE,CACF,oBAAY;IACV,CAAC,CAAC,IAAA,uBAAK,EAAC,OAAO,CAAC,WAAW,CAAC,EAAE,oBAAU,EAAE,MAAM,IAAI,EAAE,CAAC;IACvD,CAAC,CAAC,IAAA,uBAAK,EAAC,OAAO,EAAE,EAAE,qBAAW,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;AANrC,QAAA,gBAAgB,oBAMqB;AAElD,kBAAe,IAAA,wBAAgB,GAAE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* External libraries that are required at runtime but should not be bundled.
|
|
3
|
+
* These are typically third-party dependencies or internal Nimbus packages that are expected to be available
|
|
4
|
+
* in the consuming application's environment.
|
|
4
5
|
*/
|
|
5
6
|
export declare const externalLibs: {
|
|
6
7
|
"@floating-ui/react": string;
|
|
@@ -8,23 +9,42 @@ export declare const externalLibs: {
|
|
|
8
9
|
react: string;
|
|
9
10
|
"react-dom": string;
|
|
10
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Internal Nimbus sub-packages that should be treated as external dependencies.
|
|
14
|
+
* These are packages within our monorepo that are commonly used across multiple components.
|
|
15
|
+
* By marking them as external:
|
|
16
|
+
* - Prevents duplicate bundling of the same code
|
|
17
|
+
* - Reduces bundle sizes
|
|
18
|
+
*
|
|
19
|
+
* When adding a new package here, consider:
|
|
20
|
+
* 1. Is it used by multiple components?
|
|
21
|
+
* 2. Is it a fundamental building block of the design system?
|
|
22
|
+
* 3. Would bundling it multiple times be inefficient?
|
|
23
|
+
* @see https://webpack.js.org/configuration/externals/
|
|
24
|
+
*/
|
|
11
25
|
export declare const externalPackages: {
|
|
12
26
|
"@nimbus-ds/icon": string;
|
|
13
|
-
"@nimbus-ds/icons": string;
|
|
14
27
|
"@nimbus-ds/skeleton": string;
|
|
28
|
+
"@nimbus-ds/icons": string;
|
|
15
29
|
"@nimbus-ds/spinner": string;
|
|
16
30
|
"@nimbus-ds/text": string;
|
|
17
31
|
"@nimbus-ds/title": string;
|
|
18
32
|
"@nimbus-ds/tokens": string;
|
|
33
|
+
"@nimbus-ds/box": string;
|
|
34
|
+
"@nimbus-ds/chip": string;
|
|
35
|
+
"@nimbus-ds/progress-bar": string;
|
|
19
36
|
};
|
|
20
37
|
export declare const externalItems: {
|
|
21
38
|
"@nimbus-ds/icon": string;
|
|
22
|
-
"@nimbus-ds/icons": string;
|
|
23
39
|
"@nimbus-ds/skeleton": string;
|
|
40
|
+
"@nimbus-ds/icons": string;
|
|
24
41
|
"@nimbus-ds/spinner": string;
|
|
25
42
|
"@nimbus-ds/text": string;
|
|
26
43
|
"@nimbus-ds/title": string;
|
|
27
44
|
"@nimbus-ds/tokens": string;
|
|
45
|
+
"@nimbus-ds/box": string;
|
|
46
|
+
"@nimbus-ds/chip": string;
|
|
47
|
+
"@nimbus-ds/progress-bar": string;
|
|
28
48
|
"@floating-ui/react": string;
|
|
29
49
|
"@nimbus-ds/styles": string;
|
|
30
50
|
react: string;
|
package/dist/config/external.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.externalItems = exports.externalPackages = exports.externalLibs = void 0;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* External libraries that are required at runtime but should not be bundled.
|
|
6
|
+
* These are typically third-party dependencies or internal Nimbus packages that are expected to be available
|
|
7
|
+
* in the consuming application's environment.
|
|
7
8
|
*/
|
|
8
9
|
exports.externalLibs = {
|
|
9
10
|
"@floating-ui/react": "@floating-ui/react",
|
|
@@ -11,14 +12,30 @@ exports.externalLibs = {
|
|
|
11
12
|
react: "react",
|
|
12
13
|
"react-dom": "react-dom",
|
|
13
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Internal Nimbus sub-packages that should be treated as external dependencies.
|
|
17
|
+
* These are packages within our monorepo that are commonly used across multiple components.
|
|
18
|
+
* By marking them as external:
|
|
19
|
+
* - Prevents duplicate bundling of the same code
|
|
20
|
+
* - Reduces bundle sizes
|
|
21
|
+
*
|
|
22
|
+
* When adding a new package here, consider:
|
|
23
|
+
* 1. Is it used by multiple components?
|
|
24
|
+
* 2. Is it a fundamental building block of the design system?
|
|
25
|
+
* 3. Would bundling it multiple times be inefficient?
|
|
26
|
+
* @see https://webpack.js.org/configuration/externals/
|
|
27
|
+
*/
|
|
14
28
|
exports.externalPackages = {
|
|
15
29
|
"@nimbus-ds/icon": "@nimbus-ds/icon",
|
|
16
|
-
"@nimbus-ds/icons": "@nimbus-ds/icons",
|
|
17
30
|
"@nimbus-ds/skeleton": "@nimbus-ds/skeleton",
|
|
31
|
+
"@nimbus-ds/icons": "@nimbus-ds/icons",
|
|
18
32
|
"@nimbus-ds/spinner": "@nimbus-ds/spinner",
|
|
19
33
|
"@nimbus-ds/text": "@nimbus-ds/text",
|
|
20
34
|
"@nimbus-ds/title": "@nimbus-ds/title",
|
|
21
35
|
"@nimbus-ds/tokens": "@nimbus-ds/tokens",
|
|
36
|
+
"@nimbus-ds/box": "@nimbus-ds/box",
|
|
37
|
+
"@nimbus-ds/chip": "@nimbus-ds/chip",
|
|
38
|
+
"@nimbus-ds/progress-bar": "@nimbus-ds/progress-bar",
|
|
22
39
|
};
|
|
23
40
|
exports.externalItems = { ...exports.externalLibs, ...exports.externalPackages };
|
|
24
41
|
//# sourceMappingURL=external.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external.js","sourceRoot":"","sources":["../../src/config/external.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"external.js","sourceRoot":"","sources":["../../src/config/external.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,YAAY,GAAG;IAC1B,oBAAoB,EAAE,oBAAoB;IAC1C,mBAAmB,EAAE,mBAAmB;IACxC,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,WAAW;CACzB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACU,QAAA,gBAAgB,GAAG;IAC9B,iBAAiB,EAAE,iBAAiB;IACpC,qBAAqB,EAAE,qBAAqB;IAC5C,kBAAkB,EAAE,kBAAkB;IACtC,oBAAoB,EAAE,oBAAoB;IAC1C,iBAAiB,EAAE,iBAAiB;IACpC,kBAAkB,EAAE,kBAAkB;IACtC,mBAAmB,EAAE,mBAAmB;IACxC,gBAAgB,EAAE,gBAAgB;IAClC,iBAAiB,EAAE,iBAAiB;IACpC,yBAAyB,EAAE,yBAAyB;CACrD,CAAC;AAEW,QAAA,aAAa,GAAG,EAAE,GAAG,oBAAY,EAAE,GAAG,wBAAgB,EAAE,CAAC"}
|