-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compile both esm and cjs format of @repo/utils
- Loading branch information
1 parent
0adaa07
commit 6de8b7d
Showing
12 changed files
with
9,852 additions
and
14,244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint/eslint-plugin"], | ||
"extends": ["plugin:@typescript-eslint/recommended"], | ||
"root": true, | ||
"env": { | ||
"node": true, | ||
"jest": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# Change Log - @shared/utils | ||
|
||
## 3.0.0 | ||
|
||
### Major Changes | ||
|
||
- compile both esm and cjs | ||
|
||
## 2.0.0 | ||
|
||
### Major Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,47 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-require-imports | ||
const typescript = require('@rollup/plugin-typescript') | ||
import terser from '@rollup/plugin-terser' | ||
import typescript from '@rollup/plugin-typescript' | ||
import { defineConfig } from 'rollup' | ||
|
||
/** | ||
* @type {import('rollup').RollupOptions} | ||
*/ | ||
module.exports = { | ||
input: 'src/index.ts', | ||
output: { | ||
file: 'dist/index.js', | ||
format: 'commonjs', | ||
sourcemap: true | ||
export default defineConfig([ | ||
{ | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/index.cjs', | ||
format: 'cjs' | ||
} | ||
], | ||
plugins: [ | ||
/** | ||
* @type {import('@rollup/plugin-typescript').RollupTypescriptOptions} | ||
*/ | ||
typescript(), | ||
/** | ||
* @type {import('@rollup/plugin-terser').Options} | ||
*/ | ||
terser() | ||
] | ||
}, | ||
plugins: [ | ||
/** | ||
* @type {import('@rollup/plugin-typescript').RollupTypescriptOptions} | ||
*/ | ||
typescript({ | ||
outputToFilesystem: true, | ||
tsconfig: './tsconfig.json' | ||
}) | ||
] | ||
} | ||
{ | ||
input: 'src/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/index.js', | ||
format: 'esm' | ||
} | ||
], | ||
plugins: [ | ||
/** | ||
* @type {import('@rollup/plugin-typescript').RollupTypescriptOptions} | ||
*/ | ||
typescript(), | ||
/** | ||
* @type {import('@rollup/plugin-terser').Options} | ||
*/ | ||
terser() | ||
] | ||
} | ||
]) |
Oops, something went wrong.