Update "Using WebPack" section in README about importing ably directly from static file #1792
Labels
documentation
Improvements or additions to public interface documentation (API reference or readme).
ably-js v2 uses
exports
field in its package.json, so bundlers that respect this field (like webpack v5) won't be able to resolveimport * as Ably from 'ably/build/ably.js'
which is currently suggested in README here. It fails withError: Module not found: Error: Package path ./build/ably.js is not exported from package ...\node_modules\ably (see exports field in ...\node_modules\ably\package.json)
.Instead the correct workaround is to use alias setting in webpack config like this:
See internal slack thread for more context.
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: