这是indexloc提供的服务,不要输入任何密码
Skip to content

export issues with cjs #255

@tbnritzdoge

Description

@tbnritzdoge

When I bundle

import { CentraRequest, HTTPMethod } from './lib/CentraRequest';
import { URL } from 'url';
/**
 *
 *
 * @param {(URL | string)} url
 * @param {HTTPMethod} [method='GET']
 */
export = (url: URL | string, method: HTTPMethod = 'GET') => new CentraRequest(url, method);;

I get module.exports.default = the function rather than module.exports = function which is the intended behavior.

Are there any solutions or workarounds to this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions