Update conversion documentation for Node.js
We now only support conversion to CommonJS, in order to support Node.js older than version 15.
This commit is contained in:
parent
32222304f4
commit
adfb99e7ec
|
@ -18,18 +18,14 @@ do things.
|
||||||
|
|
||||||
## Conversion of Modules
|
## Conversion of Modules
|
||||||
|
|
||||||
noVNC is written using ECMAScript 6 modules. Many of the major browsers support
|
noVNC is written using ECMAScript 6 modules. This is not supported by older
|
||||||
these modules natively, but not all. They are also not supported by Node.js. To
|
versions of Node.js. To use noVNC with those older versions of Node.js the
|
||||||
use noVNC in these places the library must first be converted.
|
library must first be converted.
|
||||||
|
|
||||||
Fortunately noVNC includes a script to handle this conversion. Please follow
|
Fortunately noVNC includes a script to handle this conversion. Please follow
|
||||||
the following steps:
|
the following steps:
|
||||||
|
|
||||||
1. Install Node.js
|
1. Install Node.js
|
||||||
2. Run `npm install` in the noVNC directory
|
2. Run `npm install` in the noVNC directory
|
||||||
3. Run `./utils/use_require.js --as <module format>`
|
|
||||||
|
|
||||||
Several module formats are available. Please run
|
|
||||||
`./utils/use_require.js --help` to see them all.
|
|
||||||
|
|
||||||
The result of the conversion is available in the `lib/` directory.
|
The result of the conversion is available in the `lib/` directory.
|
||||||
|
|
Loading…
Reference in New Issue