requirejs-esm 1.1.0 → 2.0.0

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.
Files changed (2) hide show
  1. package/README.md +4 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -8,6 +8,8 @@ A [RequireJS] plugin converting JavaScript modules from ESM to AMD. It takes car
8
8
 
9
9
  The official [RequireJS optimizer] (`r.js`) does not wire up source maps from the original (not transpiled) sources to the source map of the output bundle. It makes this or similar plugins unfeasible for serious work. If you want the proper support for source maps, replace the official optimizer package ([`requirejs`]) with the forked [`@prantlf/requirejs`], which is fixed.
10
10
 
11
+ An alternative to this plugin is a preprocessor, which converts the module format before RequireJS consumes it. It is a lot less intrusive solution, but it requires a pluggable development web server, so that a plugin (compatible with [connect middleware]) can be registered in it. See [requirejs-esm-preprocessor] for more information.
12
+
11
13
  ## Installation
12
14
 
13
15
  This module can be installed in your project using [NPM], [PNPM] or [Yarn]. Make sure, that you use [Node.js] version 14 or newer.
@@ -182,6 +184,8 @@ Licensed under the MIT license.
182
184
  [RequireJS]: http://requirejs.org
183
185
  [RequireJS optimizer]: https://requirejs.org/docs/optimization.html
184
186
  [requirejs-babel7]: https://www.npmjs.com/package/requirejs-babel7
187
+ [requirejs-esm-preprocessor]: https://www.npmjs.com/package/requirejs-esm-preprocessor
188
+ [connect middleware]: https://github.com/senchalabs/connect/wiki
185
189
  [`requirejs`]: https://www.npmjs.com/package/requirejs
186
190
  [`@prantlf/requirejs`]: https://www.npmjs.com/package/@prantlf/requirejs
187
191
  [Node.js]: http://nodejs.org/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "requirejs-esm",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "A RequireJS plugin converting JavaScript modules from ESM to AMD.",
5
5
  "author": "Ferdinand Prantl <prantlf@gmail.com>",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "engines": {
22
22
  "node": ">=14"
23
23
  },
24
- "main": "dist/plugin.js",
24
+ "main": "dist/api.js",
25
25
  "bin": {
26
26
  "esm2requirejs": "bin/esm2requirejs.js"
27
27
  },