Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Update html-to-react dependency. Note: This change requires Webpack > 4.",
"packageName": "@internal/react-components",
"email": "2684369+JamesBurnside@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Add documentation for minimum typescript and webpack versions.",
"packageName": "@internal/storybook",
"email": "2684369+JamesBurnside@users.noreply.github.com",
"dependentChangeType": "patch"
}
812 changes: 727 additions & 85 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

826 changes: 755 additions & 71 deletions common/config/rush/variants/stable/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/communication-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@fluentui/react": "~8.98.3",
"copy-to-clipboard": "~3.3.1",
"events": "~3.3.0",
"html-to-react": "~1.4.5",
"html-to-react": "~1.5.0",
"immer": "9.0.6",
"memoize-one": "~5.2.1",
"nanoid": "3.1.32",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@fluentui/react": "~8.98.3",
"@internal/acs-ui-common": "1.3.2-beta.1",
"copy-to-clipboard": "~3.3.1",
"html-to-react": "~1.4.5",
"html-to-react": "~1.5.0",
"react-aria-live": "^2.0.5",
"react-linkify": "^1.0.0-alpha",
"uuid": "^8.1.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/storybook/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module.exports = {
// Speeds up webpack build time after every code change. Improvements of up
// to 4-5 seconds can be seen. Comment if components don't render properly.
typescript: { reactDocgen: 'react-docgen' },
core: {
builder: 'webpack5',
},
addons: [
'@storybook/addon-links',
{
Expand Down
2 changes: 2 additions & 0 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
"@storybook/addon-essentials": "~6.5.7",
"@storybook/addon-links": "~6.5.7",
"@storybook/addon-storyshots": "~6.5.7",
"@storybook/builder-webpack5": "6.5.12",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some other packages like @storybook/api are still staying in ~6.5.7, I guess we might want to align them together? (maybe make them all into ~6.5.12?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should but as there's no errors I imagine it will fall into 'isn't broke won't fix it'. In saying that storybook7 is currently in development and on like alpha v42 so easiest to wait for that then do a big upgrade!

"@storybook/manager-webpack5": "6.5.12",
"@storybook/node-logger": "~6.5.7",
"@storybook/react": "~6.5.7",
"@storybook/storybook-deployer": "~2.8.10",
Expand Down
9 changes: 9 additions & 0 deletions packages/storybook/stories/Setup.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ Should you want to update anything make sure that it is compatible with react ve

### Installing the Package

#### Package prequiresites

The Azure Communication UI Library supports the following minimum versions:

- `typescript` >= 3.7.0
- `webpack` >= 5.3.8

#### npm install

Use the `npm install` command to install the Azure Communication Services UI Library for JavaScript.

```bash
Expand Down
19 changes: 19 additions & 0 deletions packages/storybook/stories/Troubleshooting.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,22 @@ by `npm add`.
```
PS C:\tmp\acs\my-react-app> npm add --legacy-peer-deps @azure/communication-react
```

## Project build errors

### Webpack ERROR Unexpected token: `export * as`

```
ERROR in /.../htmlparser2@8.0.1/node_modules/htmlparser2/lib/esm/index.js 59:9
Module parse failed: Unexpected token (59:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| return getFeed(parseDOM(feed, options));
| }
> export * as DomUtils from "domutils";
| // Old name for DomHandler
| export { DomHandler as DefaultHandler };
```

This issue will occur when using `@azure/communication-react` with a webpack version < 5.
The best course of action is to upgrade your webpack version to 5.
If this is not possible take a look at these workarounds: https://github.com/fb55/htmlparser2/issues/1237#issuecomment-1182522861.
Comment thread
JamesBurnside marked this conversation as resolved.
Outdated
3 changes: 3 additions & 0 deletions tools/check-treeshaking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"@internal/calling-component-bindings": "1.3.2-beta.1"
},
"devDependencies": {
"@babel/core": "~7.16.0",
"@babel/plugin-proposal-export-namespace-from": "~7.16.0",
"babel-loader": "8.1.0",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-prettier": "^3.1.4",
Expand Down
12 changes: 12 additions & 0 deletions tools/check-treeshaking/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ module.exports = {
}
],
exclude: /node_modules/
},
{
// Loader required due to: https://github.com/fb55/htmlparser2/issues/1237#issuecomment-1182522861
test: /htmlparser2\/lib\/esm\/index.js$/,
use: [
{
loader: 'babel-loader',
options: {
plugins: ['@babel/plugin-proposal-export-namespace-from']
}
}
]
}
]
},
Expand Down