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 Issues

Spike: output is not a valid es or missing relevant imports

If you have landed directly here then consider going through README for some more context.

Steps to reproduce

Setup

npm install
npm start

Issue with webpack compiled module

Edit file src/index.js line 4

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

In result you will see following error in browser:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Screenshot
image


Issue with babel compiled module

Edit file src/index.js line 4

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

In result you will see following error in browser:

./src/components/joe-bloggs/babel/index.js
Module not found: Can't resolve './style.module.css' in '~/babel-vs-babel-loader/src/components/joe-bloggs/babel'

Screenshot
image

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.