GithubHelp home page GithubHelp logo

Bundle dependencies about ow HOT 8 CLOSED

sindresorhus avatar sindresorhus commented on May 19, 2024
Bundle dependencies

from ow.

Comments (8)

SamVerschueren avatar SamVerschueren commented on May 19, 2024

I don't believe TS can do this itself, but maybe a tool like Rollup can. Let me experiment with that.

from ow.

kevva avatar kevva commented on May 19, 2024

I've tried doing it with webpack and Rollup before which is pretty shaky if you stumble upon something like I did in sindresorhus/meow#67 (comment).

I was going to do a module that does this but I haven't found the time just yet.

from ow.

sindresorhus avatar sindresorhus commented on May 19, 2024

@SamVerschueren I would go with Webpack as it's better maintained and larger ecosystem.

@kevva We're not using module.parent here though.

from ow.

SamVerschueren avatar SamVerschueren commented on May 19, 2024

My first draft seems to work okay-ish with Rollup. It produces one single bundle. I will also take a look at how npm-packer works.

from ow.

sindresorhus avatar sindresorhus commented on May 19, 2024

@SamVerschueren npm-packer is a no-go as it doesn't produce one file, but rather bundles all the files from dependencies.

from ow.

SamVerschueren avatar SamVerschueren commented on May 19, 2024

It also doesn't seem to work properly. Tested it out, always gives me an error.

from ow.

SamVerschueren avatar SamVerschueren commented on May 19, 2024

I believe Webpack is the right tool for the job. Seems to work well. The stack trace is kinda foobar though. Not sure if this matters?

screen shot 2017-10-30 at 21 12 23

from ow.

sindresorhus avatar sindresorhus commented on May 19, 2024

Too bad, but not a show stopper. We could consider solutions like https://github.com/evanw/node-source-map-support or other things. Or maybe it's enough to just capture the stack like

// Error.captureStackTrace(this, context);

from ow.

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.