lodash-commonjs-es
v1.2.0
Published
Combines lodash and lodash-es packages
Downloads
1,721
Readme
Lodash CommonJS + ES
Table of contents
Overview
Combines lodash and lodash-es packages.
Installation
npm install lodash-commonjs-es
HowTo
Distributing CommonJS + ES in one package
Sample configuration to store CommonJS version in dist folder and ES2020 version in es folder:
// package.json
{
"main": "dist/index.js",
"module": "es/index.js",
"scripts": {
"build": "npm run build-commonjs && npm run build-es",
"build-commonjs": "tsc --project tsconfig-commonjs.json",
"build-es": "tsc --project tsconfig-es.json"
},
"dependencies": {
"lodash-commonjs-es": "^1.0.0"
}
}
// tsconfig-commonjs.json
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "CommonJS",
"outDir": "dist"
}
}
// tsconfig-es.json
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "ES2020",
"outDir": "es"
}
}