Giter VIP home page Giter VIP logo

Comments (3)

vincentfretin avatar vincentfretin commented on July 23, 2024

This is interesting http://2ality.com/2017/06/pkg-esnext.html
It says this for the module key: module is restricted to what is currently supported by Node.js.
and if you want the raw code, you need another key like jsnext:main.

Oh, I just tested something. In my project, if I put the babel config in babel-loader like this

            use: {
              loader: 'babel-loader',                                              
              options: {
                "plugins" : ["transform-object-rest-spread", "transform-class-properties"],
                "presets" : ["es2015", "react"]
              },
              include: [
                path.join(__dirname, 'js'),
                path.join(__dirname, 'node_modules/react-tweet-embed')
              ]
          }
        },

instead of using a .babelrc file, it will completely ignore the .babelrc file in your package, and it will transpile ok.

So I guess I have a workaround for my issue. But please consider transpiling to ES5 for the module key. Thanks.

from react-tweet-embed.

capaj avatar capaj commented on July 23, 2024

@vincentfretin where I used this, I transpiled all the code with babel, even inside the node_modules.
I will let it transpile to ES5 in 1.0.8 for the built file

from react-tweet-embed.

vincentfretin avatar vincentfretin commented on July 23, 2024

Thanks. Perfect.

from react-tweet-embed.

Related Issues (20)

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.