Skip to content

Commit 7b070d4

Browse files
committed
build: no terser
1 parent 693c07f commit 7b070d4

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"magic-error": "^0.0.0"
4141
},
4242
"devDependencies": {
43+
"@rollup/plugin-typescript": "3",
4344
"@stoplight/eslint-config": "^1.2.0",
4445
"@stoplight/scripts": "8.2.1",
4546
"@stoplight/types": "^11.9.0",

rollup.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import typescript from '@rollup/plugin-typescript';
2+
import * as path from 'path';
3+
4+
const BASE_PATH = process.cwd();
5+
6+
const plugins = [
7+
typescript({
8+
tsconfig: path.resolve(BASE_PATH, 'tsconfig.build.json'),
9+
include: ['src/**/*.{ts,tsx}'],
10+
}),
11+
];
12+
13+
export default [
14+
{
15+
input: path.resolve(BASE_PATH, 'src/index.ts'),
16+
plugins,
17+
output: [
18+
{
19+
file: path.resolve(BASE_PATH, 'dist/index.cjs.js'),
20+
format: 'cjs',
21+
},
22+
{
23+
file: path.resolve(BASE_PATH, 'dist/index.es.js'),
24+
format: 'esm',
25+
},
26+
],
27+
},
28+
];

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@
802802
dependencies:
803803
"@types/node" ">= 8"
804804

805-
"@rollup/plugin-typescript@^3.0.0":
805+
"@rollup/plugin-typescript@3", "@rollup/plugin-typescript@^3.0.0":
806806
version "3.1.1"
807807
resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-3.1.1.tgz#a39175a552ed82a3e424862e6bb403bf9da451ee"
808808
integrity sha512-VPY1MbzIJT+obpav9Kns4MlipVJ1FuefwzO4s1uCVXAzVWya+bhhNauOmmqR/hy1zj7tePfh3t9iBN+HbIzyRA==

0 commit comments

Comments
 (0)