This is because support for exports, conditional exports and exports patterns have been retro-fitted back to v12 (see the Package module history)
Upgrade notes
Users of Node.js v12.20 and above may now use local-web-server (previously, you needed a minimum of node v14). There are no further changes.
v5.0.0
This is a refresher release - there are no functional or behavioural changes to the web server itself.
Breaking changes since v4.2.1
Dropped support for Node.js < v14
Dropped support for CommonJS in general
Dropped support for plugin prefixes
Previously, you could omit the lws- in plugin names, (i.e. you could use --stack static instead of --stack lws-static). This was ambigious and introduced the risk of incorrectly loading a module named static, if it existed.
Several of the API methods have changed from sync to async, most importantly the Lws.create method. You now need to await the result.
const lws = await Lws.create()
New feature
The default config file lws.config.js may now also be named lws.config.mjs or lws.config.cjs if preferred.
Other improvements
All source code converted from CommonJS to ECMAScript modules.
All dependencies upgraded.
Upgrade notes
If you previously used shortened plugin names (e.g. --stack static) please use the full name (e.g. --stack lws-static)
If you launch a server using Lws.create you must now await the result.
Lws can now only be used programmatically from ECMAScript modules - you must use import to load the library.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps local-web-server from 4.2.1 to 5.2.0.
Release notes
Sourced from local-web-server's releases.
Commits
5e6580c
5.2.09f9fb49
add node v17 to CI25c2d74
lws-cors: support 'Cross-Origin-Opener-Policy' and 'Cross-Origin-Embedder-Pol...897034e
upgrade deps and datesb8fa40d
5.1.17aa8654
fix readme gifs81969bc
upgrade deps5e02b95
5.1.059e7f7c
extend support back to Node >= v12.207bcff10
5.0.0Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)