Skip to content

Update build tools for Node 8+ #5

Closed

Description

@paulmelnikow

react-component-gulp-tasks is not being maintained; see JedWatson/react-component-gulp-tasks#31.

The build still runs in Node 6.

Activity

  1. mathisonian commented on Nov 28, 2018

    @mathisonian
    Owner

    It looks like there is a fix available via JedWatson/react-component-gulp-tasks#30. However, as you note, the project doesn't seem to be merging any PRs.

    A band-aid solution could be to fork that project with the patch applied and point the dependency to the fork. Ideally we would drop the dependency altogether though, and replace with webpack or rollup.

  2. paulmelnikow commented on Nov 28, 2018

    @paulmelnikow
    CollaboratorAuthor

    I don't have a ton of experience using webpack or rollup directly, though I've used create-react-library and could either use that or mimic the way it's using rollup.

    As a band-aid, I think we could run the build in Node 6 easily enough.

  3. paulmelnikow commented on Nov 28, 2018

    @paulmelnikow
    CollaboratorAuthor

    I started a branch: 777b03d...rollup

    The library building is working well (lib/ and dist/) but the examples bit isn't quite working yet. In Rollup you can use two features, experimentalCodeSplitting and manualChunks, to accomplish something similar to the way react-component-gulp-tasks built the examples. However the output needs to be in ES Modules or SystemJS. SystemJS requires bootstrapping the SystemJS dependency, though I'm thinking that is a good way to go. Other alternatives are to build one big bundle for the example app, or to bootstrap React and react-portal, and build a small bundle.

    I haven't tackled minifying of dist/ yet. Do you think that's needed?

    Feel free to push commits to that branch if you'd like.

  4. paulmelnikow commented on Nov 30, 2018

    @paulmelnikow
    CollaboratorAuthor

    I'm running into what seems like an esoteric issue with SystemJS: systemjs/systemjs#1884. Will see how they respond.

    I did find a promising alternative to react-component-gulp-tasks called microbundle, and while that project is merging pull requests, development seems a bit stalled. See developit/microbundle#39 which is about a major transition from Bublé to Babel. Might be worth a test drive, as rolling our own rollup is turning out to be a good bit of effort.

  5. paulmelnikow commented on Dec 5, 2018

    @paulmelnikow
    CollaboratorAuthor

    I started a discussion about extracting reusable build scripts in transitive-bullshit/create-react-library#104, and asked for an update about the Babel support in microbundle at developit/microbundle#39 (comment).

    IMO it's not worth adopting microbundle until the Babel support is shipped. I'm eager to get this working in Node 10 so maybe we could merge the rollup work I did and revisit microbundle at a later date. Would you like to take a look?

  6. mathisonian commented on Dec 6, 2018

    @mathisonian
    Owner

    Rollup builds make a lot of sense to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions