@nrwl/web:rollup creates a CJS file when choosing UMD as format
See original GitHub issueCurrent Behavior
@nrwl/web:rollup creates a .cjs file when choosing umd
as build format
See screenshot:
The content of the .cjs file looks like umd format:
So it seems to be just the wrong file extension.
I saw the issue the first time in NX 14. NX 13.x was still OK.
Expected Behavior
@nrwl/web:rollup should create a .umd file if umd
was chosen in the build format.
Steps to Reproduce
You can try it in my project (mini-rx-store) on the nx14 branch: https://github.com/spierala/mini-rx-store/tree/nx14
Environment
Node : 16.15.1 OS : darwin x64 npm : 8.11.0
nx : 14.2.4 @nrwl/angular : 14.2.4 @nrwl/cypress : 14.2.4 @nrwl/detox : Not Found @nrwl/devkit : 14.3.6 @nrwl/eslint-plugin-nx : 14.2.4 @nrwl/express : Not Found @nrwl/jest : 14.2.4 @nrwl/js : 14.2.4 @nrwl/linter : 14.2.4 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : 14.0.8 @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 14.2.4 @nrwl/web : 14.2.4 @nrwl/workspace : 14.2.4 typescript : 4.7.3
Community plugins: @jscutlery/semver: 2.25.2
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
What the heck are CJS, AMD, UMD, and ESM in Javascript?
CJS imports module synchronously. You can import from a library node_modules or local dir. Either by const myLocalModule = require('./some/local ...
Read more >What Are CJS, AMD, UMD, ESM, System, and IIFE?
A bundle can be arranged in different formats. In this article, we are going to present real examples of the CJS, AMD, UMD,...
Read more >Bundling with Rollup: Build CommonJS to UMD
How to build a Rollup bundle to UMD, CJS, and IIFE formats for CommonJS modules. ... Create the entry file index.js : ......
Read more >rollup.js
UMD format requires a bundle name rollup main.js --file bundle.js ... You can provide an optional Rollup configuration file to simplify command line...
Read more >Authoring a JavaScript library that works everywhere using ...
file : `dist/${pkg.name}.min.js`, format: "umd", name: "myLibrary", esModule: false, exports: "named" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it also mentions that UMD format is deprecated and will be removed in Nx 15, and I am a bit concerned as well because I am using the umd version of a package for running in a node environment.
I really don’t know why UMD support has been ditched, its still in the web:rollup. And I need it to compile our webcomponent library for use with simple CDN import.