@ctx-core/function
Advanced tools
Comparing version 10.5.9 to 10.5.10
{ | ||
"name": "@ctx-core/function", | ||
"version": "10.5.9", | ||
"version": "10.5.10", | ||
"description": "ctx-core function", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "d385abc497fb0a4d2fc57f9d291656faef1967f3" | ||
"gitHead": "c2ab28c87255b2c86f65a6d58fd6695d189415bd" | ||
} |
@@ -0,33 +1,37 @@ | ||
import { join } from 'path' | ||
import typescript_plugin from 'rollup-plugin-typescript2' | ||
import pkg from './package.json' | ||
export default [ | ||
{ | ||
input: 'src/lib/index.ts', | ||
output: [ | ||
{ | ||
file: 'lib/index.mjs', | ||
format: 'esm', | ||
}, | ||
{ | ||
file: 'lib/index.js', | ||
format: 'cjs', | ||
}, | ||
], | ||
plugins: [typescript_plugin({ | ||
module: 'ES2018', | ||
tsconfigOverride: { | ||
compilerOptions: { | ||
declarationDir: __dirname, | ||
export function _config(dir = '.') { | ||
return [ | ||
{ | ||
input: join(dir, 'src/lib/index.ts'), | ||
output: [ | ||
{ | ||
file: join(dir, 'lib/index.mjs'), | ||
format: 'esm', | ||
}, | ||
include: ['src/lib/index.ts'], | ||
exclude: [], | ||
}, | ||
})], | ||
external: | ||
Object.keys(pkg.dependencies || {}) | ||
.concat(Object.keys(pkg.devDependencies || {})) | ||
.concat( | ||
require('module').builtinModules || Object.keys(process.binding('natives')) | ||
), | ||
} | ||
] | ||
{ | ||
file: join(dir, 'lib/index.js'), | ||
format: 'cjs', | ||
}, | ||
], | ||
plugins: [typescript_plugin({ | ||
module: 'ES2018', | ||
tsconfigOverride: { | ||
compilerOptions: { | ||
declarationDir: __dirname, | ||
}, | ||
include: [join(dir, 'src/lib/index.ts')], | ||
exclude: [], | ||
}, | ||
})], | ||
external: | ||
Object.keys(pkg.dependencies || {}) | ||
.concat(Object.keys(pkg.devDependencies || {})) | ||
.concat( | ||
require('module').builtinModules || Object.keys(process.binding('natives')) | ||
), | ||
} | ||
] | ||
} | ||
export default _config() |
67421
2334