There are plenty of developers who use old fashioned style to import this library, which is not totally compatible with ECMAScript Module System. Just like React, which is a pure CommonJS library too.
'importStar' or 'importDefault' will both work in any bundler with CommonJS Module System and ECMAScript Module System, for example vite, esbuild, webpack, or some frameworks on them, just like rollup, umijs, parcel and so on.
import * as React from 'react';
// or
import React from 'react';
So does this pr do.
import * as intl from 'react-intl-universal';
// or
import intl from 'react-intl-universal';
and optimize grammar of best practice in README.md
There are plenty of developers who use old fashioned style to import this library, which is not totally compatible with ECMAScript Module System. Just like React, which is a pure CommonJS library too.
'importStar' or 'importDefault' will both work in any bundler with CommonJS Module System and ECMAScript Module System, for example vite, esbuild, webpack, or some frameworks on them, just like rollup, umijs, parcel and so on.
So does this pr do.
and optimize grammar of best practice in README.md