@solace-health/ui 0.10.248 → 0.10.250
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/README.md +34 -0
- package/dist/index.cjs +358 -312
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -7
- package/dist/index.d.ts +24 -7
- package/dist/index.js +286 -241
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,40 @@ npm install @solace-health/ui
|
|
|
25
25
|
2. Run `npm run storybook` or `npm run dev` is you only need to run in watch mode
|
|
26
26
|
|
|
27
27
|
## Use local package in external application
|
|
28
|
+
### Using `npm link`
|
|
29
|
+
First, make sure the ui library and app you're working on are running the same Node version. If not, the app will select the version that matches, i.e. the one in its node_modules. Simply update .nvmrc in the ui library locally if needed and remember to not commit it unless needed.
|
|
30
|
+
|
|
31
|
+
In the UI library folder:
|
|
32
|
+
```
|
|
33
|
+
npm link
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
In the app folder:
|
|
37
|
+
```
|
|
38
|
+
npm link @solace-health/ui
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Voila! Next will hot reload changes made in the ui library as long as it is running `npm run dev`.
|
|
42
|
+
|
|
43
|
+
🚨 **If you are running into issues with dependencies**
|
|
44
|
+
Add a webpack alias if duplicate dependencies are causing issues. [More info](https://blog.maximeheckel.com/posts/duplicate-dependencies-npm-link/)
|
|
45
|
+
```
|
|
46
|
+
const nextConfig = {
|
|
47
|
+
// the rest of the config
|
|
48
|
+
webpack: (config) => {
|
|
49
|
+
const newConfig = {...config};
|
|
50
|
+
|
|
51
|
+
newConfig.resolve.alias = {
|
|
52
|
+
...(config.resolve.alias || {}),
|
|
53
|
+
"@emotion/react": path.resolve("./node_modules/@emotion/react"),
|
|
54
|
+
};
|
|
55
|
+
return newConfig;
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Using `yalc`
|
|
61
|
+
This legacy method is not as reliable but previously the only way to link the ui library with the app. If possible, try to use `npm link` first.
|
|
28
62
|
|
|
29
63
|
Install [yalc](https://github.com/wclr/yalc) globally
|
|
30
64
|
|