GithubHelp home page GithubHelp logo

jabranr / babel-vs-babel-loader Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 4.41 MB

Investigation on babel vs babel-loader output. Experimental repository.

License: MIT License

JavaScript 78.34% HTML 12.17% SCSS 9.49%
babel babel-loader webpack es6 javascript modules commonjs es6-modules commonjs-modules

babel-vs-babel-loader's Introduction

babel vs babel-loader

Investigating output from babel and babel-loader which is vastly different from each other.

Objective

Make a React component ready to be published to npm as a module. Intended targets are es6 and commonjs modules.

Usage

Install dependencies

npm install

Start app

Running following command will start the app and watch for changes.

npm start

Then you can edit src/index.js to try each version of the build such as:

ES6

- import JoeBloggs from './components/joe-bloggs';
+ import JoeBloggs from './components/joe-bloggs/dist';

CommonJS

- import JoeBloggs from './components/joe-bloggs';
+ import JoeBloggs from './components/joe-bloggs/dist/cjs';

Please note that any styles will be stripped off in CommonJS version

Details of the issue (now resolved) from this step onwards are here

Build

npm run build

This will output results into dist/.

License

MIT License

ยฉ Jabran Rafique โ€“ 2019

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.