GithubHelp home page GithubHelp logo

Multiple bundles support about neutrino HOT 3 CLOSED

neutrinojs avatar neutrinojs commented on August 16, 2024
Multiple bundles support

from neutrino.

Comments (3)

onigoetz avatar onigoetz commented on August 16, 2024 1

Very interesting, yes it seems to answer my need.

I'll come back to you if I have more questions or to share my final implementation :D

Thanks

from neutrino.

eliperelman avatar eliperelman commented on August 16, 2024

If you need to generate different bundles, without knowing your exact needs, I would probably recommend running different commands mapped to different configuration combinations. For example:

neutrino build --presets neutrino-preset-react bundle-a
neutrino build --presets neutrino-preset-react bundle-b
neutrino build --presets neutrino-preset-react bundle-c

This would generate 3 bundles, each with configuration overrides in their bundle-* files. You can also make this easier in your package.json:

{
  "presets": [
    "neutrino-preset-react"
  ],
  "scripts": {
    "build:a": "neutrino build --presets bundle-a",
    "build:b": "neutrino build --presets bundle-b",
    "build:c": "neutrino build --presets bundle-c",
    "build": "yarn build:a && yarn build:b && yarn build:c"
  }
}

Another option would be to add multiple entry points above just the index entry. This would create a bundle for every entry. It would most likely share other common configuration between the entries.

Does that answer your use case?

from neutrino.

eliperelman avatar eliperelman commented on August 16, 2024

Great! Closing for now. Please file an issue if there is a problem with those approaches.

from neutrino.

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.