Giter Site home page Giter Site logo

Vite plugin for aurelia 1.x? about aurelia HOT 4 OPEN

obedm503 avatar obedm503 commented on June 8, 2024 2
Vite plugin for aurelia 1.x?

from aurelia.

Comments (4)

bigopon avatar bigopon commented on June 8, 2024 1

The webpack plugin for v1 does a few things:

  • scan dependencies (PLATFORM.moduleName, , etc...)
  • map build time module location to a runtime time understandable map (Origin, view convention etc...)
  • preserve and obsfucate the right exports
  • work in harmony with otger plugins

There maybe more that I dont remember but its a lot of work, difficult work to replicate as another bundler plugin.
The work of creating a map of modules at build time that runtime can work with is not easy, or straight forwards., since Vite, or Rollup concatenates/hoist all modules in the same chunk together.

That said, its possible to support Vite or any bundler if we are to use static dependency declaration of v1, instead of module name, we use the resources directly. This feature isnt doc'd because its not in its complete form: v1 router support isnt implemented yet.
Ideally we need to have the following supported in router:

viewModel: () => MyComponent

Instead of its current string based for module name form.

So my answer would be it depends: whether we can have time and resources to implement this feature in the v1 router or not.

from aurelia.

ghiscoding avatar ghiscoding commented on June 8, 2024 1

If this is for Aurelia 1, shouldn't this be in aurelia/framework? This doesn't seem to belong in here since it's not Au2 related

from aurelia.

obedm503 avatar obedm503 commented on June 8, 2024

It's here because it should be part of the migration path to v2

from aurelia.

bigopon avatar bigopon commented on June 8, 2024

Currently there's not really a way to write v1 app in a rollup based setup (at least officially), so I think we can safely assume apps will be migrating from webpack to webpack, or dumber to dumber, or jspm to jspm. I would not suggest migrating webpack/dumber/jspm to vite in 1 go, at least I wouldn't do it myself, a lot of funny conversations could happen.

from aurelia.

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.