Giter Site home page Giter Site logo

Support for browserify bundler with babelify about xjs HOT 3 CLOSED

 avatar commented on August 11, 2024
Support for browserify bundler with babelify

from xjs.

Comments (3)

 avatar commented on August 11, 2024

Browserify is quite tricky than it should be. Currently it behaves abnormally when trying to compile es2015 modules located under node_modules folder. I filed a separate issue in babelify since it's weird that it would work if the project was under bower_components folder, but wouldn't work when under node_modules folder.

So the workaround that I think would work across the board (ie. getting xjs through npm or bower) is by modifying the ES5 bundled version of xjs framework to work with es2015. (That is, always add module.exports = _require('xjs'); to the end of the file).

The gulp task shall create an xjs-es2015.js file that would work for browserify-based projects. I shall commit it on a separate branch and reference it to this issue for you guys (@SML-MeSo and @Matrim-Cauthon ) to review.

from xjs.

mikeybanez avatar mikeybanez commented on August 11, 2024

Please also check if there will be any necessary changes to our existing documentation / if there are new articles that need to be written accordingly.

from xjs.

 avatar commented on August 11, 2024

Yes, we'll need to modify the tutorial for developing plugins using es2015 to include an option of using a bundled version rather than the modular approach. Key differences is that the bundled version would work with browserify and webpack, whereas the modular version would work only on webpack (for now, until babelify supports it).

I filed a separate issue on xjsframework.github.io's issue tracker (xjsframework/xjsframework.github.io#10)

from xjs.

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.