Skip to content

Commit

Permalink
chore: externalize rollup-plugin-dts
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed May 18, 2020
1 parent f811a9a commit c398839
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"dependencies": {
"joycon": "^2.2.5",
"rollup": "^2.10.0",
"rollup-plugin-esbuild": "^1.4.1"
"rollup-plugin-esbuild": "^1.4.1",
"rollup-plugin-dts": "^1.4.6"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^11.1.0",
Expand All @@ -35,7 +36,6 @@
"prettier": "^2.0.5",
"pretty-bytes": "^5.3.0",
"resolve": "^1.17.0",
"rollup-plugin-dts": "^1.4.4",
"rollup-plugin-hashbang": "^2.2.2",
"ts-jest": "^25.5.1",
"tsup": "^1.4.4",
Expand Down
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export async function createRollupConfigs(files: string[], options: Options) {
dts,
}: {
dts?: boolean
}): Promise<{ name: string, inputConfig: InputOptions; outputConfig: OutputOptions }> => {
}): Promise<{
name: string
inputConfig: InputOptions
outputConfig: OutputOptions
}> => {
return {
name: `dts: ${dts}, bundle: ${options.bundle}`,
inputConfig: {
Expand Down Expand Up @@ -71,7 +75,7 @@ export async function createRollupConfigs(files: string[], options: Options) {
commonjsPlugin({
namedExports: {
// commonjs plugin failed to detect named exports for `resolve`, TODO: report this bug
resolve: ['sync', 'isCore', 'default']
resolve: ['sync', 'isCore', 'default'],
},
// @ts-ignore wrong typing in @rollup/plugin-commonjs
ignore: (name: string) => {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3075,10 +3075,10 @@ rimraf@^3.0.0:
dependencies:
glob "^7.1.3"

rollup-plugin-dts@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-1.4.4.tgz#0620937da0fb52c884631fea7ff5410d758ded4b"
integrity sha512-BqGwRtZVYSd2ol0GI3SscJhYCIwOwULzSiK3Zx8tZYXz26HxGCrAyAYmZv3nZn5krsGFcGmNHlP+RhC0hXSyNQ==
rollup-plugin-dts@^1.4.6:
version "1.4.6"
resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-1.4.6.tgz#26e3da11ec647cfffee9658b63fa41d67e7840b9"
integrity sha512-1o5+eI97Ne8zXJrgdasn/xGi0xKuovCQwZRtPI2Lfl/c6qa9jQTFbn60NwOx3gWJ89K265/6kpDuahnBbplyWA==
optionalDependencies:
"@babel/code-frame" "^7.8.3"

Expand Down

0 comments on commit c398839

Please sign in to comment.