@carbon/charts-svelte 1.6.2 → 1.6.4
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 +16 -0
- package/README.md +30 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.6.4](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.3...v1.6.4) (2023-02-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.6.3](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.2...v1.6.3) (2022-12-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.6.2](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.1...v1.6.2) (2022-12-06)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @carbon/charts-svelte
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Notice
|
|
2
2
|
|
|
3
|
-
### This version
|
|
3
|
+
### This version relies on **Carbon v11**. If you're using Carbon v10, [see the legacy demo site](https://carbon-charts-0x.netlify.app)
|
|
4
4
|
|
|
5
5
|
## `@carbon/charts-svelte`
|
|
6
6
|
|
|
@@ -50,8 +50,8 @@ This is an overview of using Carbon Charts with common Svelte set-ups.
|
|
|
50
50
|
building apps that support client-side rendering (CSR) and server-side rendering
|
|
51
51
|
(SSR). SvelteKit is powered by [Vite](https://github.com/vitest-dev/vitest).
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
`@carbon/charts` and `carbon-components` should not be externalized for SSR when
|
|
54
|
+
building for production.
|
|
55
55
|
|
|
56
56
|
```js
|
|
57
57
|
// vite.config.js
|
|
@@ -61,7 +61,10 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
61
61
|
export default {
|
|
62
62
|
plugins: [sveltekit()],
|
|
63
63
|
ssr: {
|
|
64
|
-
noExternal:
|
|
64
|
+
noExternal:
|
|
65
|
+
process.env.NODE_ENV === 'production'
|
|
66
|
+
? ['@carbon/charts', 'carbon-components']
|
|
67
|
+
: [],
|
|
65
68
|
},
|
|
66
69
|
};
|
|
67
70
|
```
|
|
@@ -136,11 +139,14 @@ export default {
|
|
|
136
139
|
onwarn: (warning, warn) => {
|
|
137
140
|
// omit circular dependency warnings emitted from
|
|
138
141
|
// "d3-*" packages and "@carbon/charts"
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
if (warning.code === 'CIRCULAR_DEPENDENCY') {
|
|
143
|
+
if (
|
|
144
|
+
warning.ids.some((id) =>
|
|
145
|
+
/node_modules\/(d3-|@carbon\/charts)/.test(id)
|
|
146
|
+
)
|
|
147
|
+
) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
// preserve all other warnings
|
|
@@ -149,18 +155,26 @@ export default {
|
|
|
149
155
|
};
|
|
150
156
|
```
|
|
151
157
|
|
|
152
|
-
####
|
|
158
|
+
#### Code-splitting
|
|
153
159
|
|
|
154
|
-
If using [dynamic imports](https://rollupjs.org/guide/en/#dynamic-import),
|
|
155
|
-
`
|
|
160
|
+
If using [dynamic imports](https://rollupjs.org/guide/en/#dynamic-import), use
|
|
161
|
+
`type="module"` alongside `output.dir` for code-splitting.
|
|
156
162
|
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
```diff
|
|
164
|
+
# index.html
|
|
165
|
+
- <script src="build/bundle.js"></script>
|
|
166
|
+
+ <script type="module" src="build/index.js"></script>
|
|
167
|
+
```
|
|
159
168
|
|
|
160
169
|
```diff
|
|
170
|
+
# rollup.config.js
|
|
161
171
|
export default {
|
|
162
|
-
|
|
163
|
-
|
|
172
|
+
output: {
|
|
173
|
+
- format: "iife",
|
|
174
|
+
- file: "public/build/bundle.js",
|
|
175
|
+
+ dir: "public/build",
|
|
176
|
+
}
|
|
177
|
+
}
|
|
164
178
|
```
|
|
165
179
|
|
|
166
180
|
### Webpack
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts-svelte",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Carbon charting components for Svelte",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/carbon-design-system/carbon-charts#readme",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@carbon/charts": "^1.6.
|
|
53
|
+
"@carbon/charts": "^1.6.4",
|
|
54
54
|
"@carbon/telemetry": "0.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|