Skip to content

Commit

Permalink
Support ESM (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-josh authored Oct 11, 2023
1 parent 75ab5c3 commit ea8ea36
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This document outlines the changes from version to version.

## 2.2.0

- Added ESM support

## 2.1.1

- Added `Result.value()`
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "pratica",
"module": "pratica",
"version": "2.1.1",
"version": "2.2.0",
"description": "Functional Programming for Pragmatists",
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"author": "Jason Rametta",
"license": "Apache-2.0",
Expand Down
19 changes: 14 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import typescript from 'rollup-plugin-typescript2'
import { RollupOptions } from "rollup";

/** @type {RollupOptions} */
export default {
input: 'src/index.ts',
output: {
name: 'pratica',
format: 'cjs',
file: 'dist/index.js'
},
output: [
{
name: 'pratica',
format: 'cjs',
file: 'dist/index.cjs'
},
{
name: 'pratica',
format: 'es',
file: 'dist/index.esm.js'
}
],
plugins: [
typescript({
typescript: require('typescript'),
Expand Down

0 comments on commit ea8ea36

Please sign in to comment.