1.0.8 • Published 4 months ago
lodash-commonjs-es v1.0.8
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 ES2015 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": "ES2015",
"outDir": "es"
}
}