@carbon/charts-svelte 0.54.7 → 0.54.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.
- package/CHANGELOG.md +8 -0
- package/README.md +61 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [0.54.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.7...v0.54.8) (2022-01-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.54.7](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.6...v0.54.7) (2022-01-13)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @carbon/charts-svelte
|
package/README.md
CHANGED
|
@@ -113,12 +113,18 @@ No additional configuration should be necessary.
|
|
|
113
113
|
|
|
114
114
|
### Rollup
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
`this has been rewritten to undefined` error message.
|
|
116
|
+
#### ReferenceError: process is not defined
|
|
118
117
|
|
|
119
|
-
|
|
118
|
+
Install and add
|
|
120
119
|
[@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
|
|
121
|
-
|
|
120
|
+
to the list of plugins in `rollup.config.js` to avoid the
|
|
121
|
+
`process is not defined` runtime error.
|
|
122
|
+
|
|
123
|
+
This plugin statically replaces strings in bundled files with the specified
|
|
124
|
+
value.
|
|
125
|
+
|
|
126
|
+
In the example below, all instances of `process.env.NODE_ENV` will be replaced
|
|
127
|
+
with `"production"` while bundling.
|
|
122
128
|
|
|
123
129
|
```js
|
|
124
130
|
// rollup.config.js
|
|
@@ -126,17 +132,66 @@ import replace from '@rollup/plugin-replace';
|
|
|
126
132
|
|
|
127
133
|
export default {
|
|
128
134
|
// ...
|
|
129
|
-
inlineDynamicImports: true,
|
|
130
135
|
plugins: [
|
|
131
136
|
replace({
|
|
132
137
|
preventAssignment: true,
|
|
133
138
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
134
139
|
}),
|
|
135
|
-
// ...
|
|
136
140
|
],
|
|
137
141
|
};
|
|
138
142
|
```
|
|
139
143
|
|
|
144
|
+
#### `this` has been rewritten to `undefined`
|
|
145
|
+
|
|
146
|
+
Set [`context: "window"`](https://rollupjs.org/guide/en/#context) to address the
|
|
147
|
+
`this has been rewritten to undefined` Rollup error.
|
|
148
|
+
|
|
149
|
+
```diff
|
|
150
|
+
export default {
|
|
151
|
+
+ context: "window",
|
|
152
|
+
};
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### Circular dependency warnings
|
|
156
|
+
|
|
157
|
+
You may see circular dependency warnings for `d3` and `@carbon/charts` packages
|
|
158
|
+
that can be safely ignored.
|
|
159
|
+
|
|
160
|
+
Use the `onwarn` option to selectively ignore these warnings.
|
|
161
|
+
|
|
162
|
+
```js
|
|
163
|
+
// rollup.config.js
|
|
164
|
+
export default {
|
|
165
|
+
onwarn: (warning, warn) => {
|
|
166
|
+
// omit circular dependency warnings emitted from
|
|
167
|
+
// "d3-*" packages and "@carbon/charts"
|
|
168
|
+
if (
|
|
169
|
+
warning.code === 'CIRCULAR_DEPENDENCY' &&
|
|
170
|
+
/^node_modules\/(d3-|@carbon\/charts)/.test(warning.importer)
|
|
171
|
+
) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// preserve all other warnings
|
|
176
|
+
warn(warning);
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### Dynamic imports
|
|
182
|
+
|
|
183
|
+
If using [dynamic imports](https://rollupjs.org/guide/en/#dynamic-import), set
|
|
184
|
+
`inlineDynamicImports: true` in `rollup.config.js` to enable code-splitting.
|
|
185
|
+
|
|
186
|
+
Otherwise, you may encounter the Rollup error
|
|
187
|
+
`Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.`
|
|
188
|
+
|
|
189
|
+
```diff
|
|
190
|
+
export default {
|
|
191
|
+
+ inlineDynamicImports: true,
|
|
192
|
+
};
|
|
193
|
+
```
|
|
194
|
+
|
|
140
195
|
### Webpack
|
|
141
196
|
|
|
142
197
|
[webpack](https://github.com/webpack/webpack) is another popular application
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts-svelte",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.8",
|
|
4
4
|
"description": "Carbon charting components for Svelte",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"module": "./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": "^0.54.
|
|
53
|
+
"@carbon/charts": "^0.54.8",
|
|
54
54
|
"@carbon/telemetry": "0.0.0-alpha.6"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|