Open
Description
Hi,
First of all, thank you for a great package!
I'm using this in an Angular 15 project. Angular points out that JSON→URL is a CommonJS module, which can prevent bundlers and minifiers from optimizing my application, which results in a larger bundle size. It recommends not to depend on CommonJS modules and instead use ECMAScript modules.
Any chance of an ECMAScript module of JSON→URL?
Metadata
Metadata
Assignees
Labels
No labels
Activity
dmaccormack commentedon Sep 15, 2023
Hi, @SebastianKohler.
JSON→URL is already available as a module. This test shows a example: https://github.com/jsonurl/jsonurl-js/blob/main/itest/es6-native/main.js#L25.
How are you referencing it?
SebastianKohler commentedon Sep 15, 2023
Thanks for your reply!
I use it in a service in Angular like this:
dmaccormack commentedon Sep 15, 2023
Where is the warning message coming from (e.g. the bundler) and what is the exact message you're seeing?
SebastianKohler commentedon Sep 15, 2023
It's the Angular
@angular-devkit/build-angular
builder that produces the warning. It's displayed every time my Angular app is built.