@hypernym/bundler
Version:
ESM & TS module bundler.
55 lines (53 loc) • 1.01 kB
JavaScript
export * from "./build/index.mjs"
//#region src/config.ts
/**
* List of global default patterns for external module identifiers.
*
* @example
*
* ```ts
* import { externals } from '@hypernym/bundler'
*
* export default defineConfig({
* entries: [
* {
* input: './src/index.ts',
* externals: [...externals, 'id', /regexp/]
* },
* ]
* })
* ```
*/
const externals = [
/^node:/,
/^@types/,
/^@rollup/,
/^@rolldown/,
/^@hypernym/,
/^rollup/,
/^rolldown/
];
/**
* ESM & TS module bundler.
*
* Automatically detects a custom configuration file at the project root, which can override or extend the build behavior.
*
* Configuration file also accepts `.js`, `.mjs`, `.ts`, `.mts` formats.
*
* @example
*
* ```ts
* import { defineConfig } from '@hypernym/bundler'
*
* export default defineConfig({
* // ...
* })
* ```
*
* @see [Repository](https://github.com/hypernym-studio/bundler)
*/
function defineConfig(options) {
return options;
}
//#endregion
export { defineConfig, externals };