@justeattakeaway/pie-webc-core 0.20.0 → 0.21.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.
@@ -1,7 +1,7 @@
1
- vite v4.5.2 building for production...
1
+ vite v4.5.3 building for production...
2
2
  transforming...
3
3
  ✓ 14 modules transformed.
4
4
  rendering chunks...
5
5
  computing gzip size...
6
6
  dist/index.js 2.66 kB │ gzip: 1.20 kB
7
- ✓ built in 149ms
7
+ ✓ built in 253ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Added] - Bundle visualiser that runs during build for webc icons, webc core and our components ([#1391](https://github.com/justeattakeaway/pie/pull/1391)) by [@jamieomaguire](https://github.com/jamieomaguire)
8
+
3
9
  ## 0.20.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -16,6 +16,7 @@
16
16
  4. [Dependencies](#dependencies)
17
17
  5. [Contributing](#contributing)
18
18
  6. [Testing](#testing)
19
+ 7. [Bundling](#bundling)
19
20
 
20
21
  ## Introduction
21
22
 
@@ -72,3 +73,6 @@ We write browser tests for functionality that requires a browser environment to
72
73
 
73
74
  ### Naming and running tests
74
75
  Currently, for writing unit tests we simply name the file `**/*.spec.ts`. To write browser tests, we name the file `**/*.browser.spec.ts`. This allows us to run all unit tests using `yarn test --filter=pie-webc-core` and all browser tests using `yarn test:browsers --filter=pie-webc-core`.
76
+
77
+ ## Bundling
78
+ When we build the package, we run a plugin for Rollup named `rollup-plugin-visualizer`. This generates a file named `stats.html` in the root of the package. This file can be viewed in the browser to visualise the bundled Javascript and better understand what contributes to the size of the final build output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-webc-core",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "PIE design system base classes, mixins and utilities for web components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "lit": "3.1.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@justeattakeaway/pie-components-config": "0.14.0"
24
+ "@justeattakeaway/pie-components-config": "0.15.0"
25
25
  },
26
26
  "volta": {
27
27
  "extends": "../../../package.json"
package/vite.config.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { defineConfig } from 'vite';
2
+ import { visualizer } from 'rollup-plugin-visualizer';
2
3
 
3
4
  export default defineConfig({
4
5
  build: {
@@ -22,4 +23,10 @@ export default defineConfig({
22
23
  '**/node_modules/**/*'
23
24
  ],
24
25
  },
26
+ plugins: [
27
+ visualizer({
28
+ gzipSize: true,
29
+ brotliSize: true,
30
+ })
31
+ ],
25
32
  });