GithubHelp home page GithubHelp logo

Comments (3)

zachmullen avatar zachmullen commented on August 29, 2024

Since you're importing the source files rather than the prebuilt UMD module (which is ES5), you'd need to use the babel loader on that. You could just use a loader rule for the node_modules/@girder/components/src include pattern in this case.

from girder_web_components.

zachmullen avatar zachmullen commented on August 29, 2024

FYI, if you want to use the UMD module instead of having to inherit build rules, you'd just do

import girder from '@girder/components';

const rc = new girder.RestClient(...);
const upload = new girder.utils.Upload(rc, ...);

You could test how much extra weight that would add to your bundle; tree-shaking might be able to make them almost equivalent.

from girder_web_components.

finetjul avatar finetjul commented on August 29, 2024

Yep, both solutions (use of UMD and babel_loader only on girder components files) work.
Thanks !

from girder_web_components.

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.