@gravity-ui/app-builder 0.0.2 → 0.1.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.0](https://github.com/gravity-ui/app-builder/compare/v0.0.2...v0.1.0) (2023-02-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * limit load of dayjs locales ([#3](https://github.com/gravity-ui/app-builder/issues/3)) ([a7ff218](https://github.com/gravity-ui/app-builder/commit/a7ff2189ad99473e51f7470bc7e9ee32c490b64c))
9
+
3
10
  ## [0.0.2](https://github.com/gravity-ui/app-builder/compare/v0.0.1...v0.0.2) (2022-12-19)
4
11
 
5
12
 
@@ -26,7 +26,12 @@ interface DevServerConfig {
26
26
  }
27
27
  interface ContextReplacement {
28
28
  'highlight.js'?: string[];
29
- moment?: string[];
29
+ /**
30
+ * Used to limit loading of "moment" and "dayjs" locales
31
+ *
32
+ * @default ['ru']
33
+ */
34
+ locale?: string[];
30
35
  }
31
36
  export interface LibraryConfig {
32
37
  lib?: {
@@ -506,7 +506,10 @@ function configurePlugins(options) {
506
506
  const contextReplacement = config.contextReplacement || {};
507
507
  plugins.push(new webpack.ContextReplacementPlugin(/moment[\\/]locale$/,
508
508
  // eslint-disable-next-line security/detect-non-literal-regexp
509
- new RegExp(`^\\./(${(contextReplacement.moment || ['ru']).join('|')})$`)));
509
+ new RegExp(`^\\./(${(contextReplacement.locale || ['ru']).join('|')})$`)));
510
+ plugins.push(new webpack.ContextReplacementPlugin(/dayjs[\\/]locale$/,
511
+ // eslint-disable-next-line security/detect-non-literal-regexp
512
+ new RegExp(`^\\./(${(contextReplacement.locale || ['ru']).join('|')})$`)));
510
513
  if (contextReplacement['highlight.js']) {
511
514
  plugins.push(new webpack.ContextReplacementPlugin(/highlight\.js[\\/]lib[\\/]languages$/,
512
515
  // eslint-disable-next-line security/detect-non-literal-regexp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",