Giter Site home page Giter Site logo

Comments (6)

bjyoungblood avatar bjyoungblood commented on June 11, 2024

It looks like this is happening because of our use of babel-plugin-add-module-exports in the CommonJS build. I published v4.0.2 to address this.

In order to use the correct build, you will need to add add this alias to resolve.alias in your webpack config:

{
  'es6-error' : 'es6-error/lib/index.ts.js'
}

from es6-error.

ekoome avatar ekoome commented on June 11, 2024

The error I'm getting is runtime rather than build time. I'm not using webpack rather typescript- tsconfig.

from es6-error.

bjyoungblood avatar bjyoungblood commented on June 11, 2024

I'm not very familiar with TypeScript, but I think you can achieve the same thing by adding this to your tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": ".", // This must be specified if "paths" is.
    "paths": {
      "es6-error": ["node_modules/es6-error/lib/index.ts.js"]
    }
  }
}

from es6-error.

ekoome avatar ekoome commented on June 11, 2024

Is it easier to standardise this to established convention to have node_modules/es6-error/index.ts or index.d.ts

from es6-error.

dyihoon90 avatar dyihoon90 commented on June 11, 2024

Hi, I am sadly still running into this issue in 4.0.2, would you mind taking a look at my PR
#32 I changed the index.d.ts file to conform to module.exports

from es6-error.

bjyoungblood avatar bjyoungblood commented on June 11, 2024

I think this should be resolved by #36. Please reopen if that is not the case.

from es6-error.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.