Skip to content

CJS modules with default exports do not work #92

@linker-err0r

Description

@linker-err0r

I've tried a few of them, and so far, this class of modules seems to fail when it should be able to run in Screeps.

Consider this code added to main.ts in starter:

 // already in es6, of course
import { ErrorMapper } from "utils/ErrorMapper";

// this one works -- it's in es6 format
import * as _ from 'lodash-es'; 

 // uploads, but exports empty object
import * as _ from 'lodash';

// no error and these will upload, but code will fail on server without executing
import * as Chance from 'chance';
import * as faker from 'faker'; 

Please note that I have also taken the step of installing @types modules for these as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions