Comments (11)
I got it to work with the current CLI in our earlier repo...but I confess I forgot if I did anything special ;( It would be a bit different now that we have real packages though. I think we need to configure the view plugin in the config file.
from aurelia.
It was mostly just complaining about not finding the plugin / file. Must be some small silly thing that I used the wrong path or file or something. It errors during page load (not during tracing)
from aurelia.
The plugin works with current cli because amodro-trace uses requirejs runtime to trace, if you feed the plugin module to requirejs, it uses the plugin to rewrite the loading module.
But auto-trace cli doesn't use requirejs runtime to trace, then we need to replicate the plugin functionality in aurelia-cli/lib/build/loader-plugin.js
(it only handles 'text' for now) to handle it at bundling time.
from aurelia.
@EisenbergEffect The view plugin generates a very predicable templateSource. I talked with @fkleuver, why not we just enhance @customElment
api to fill up the gap of templateSource?
from aurelia.
Just speculating here, but I think it might be because of the convention. The plugin will get the name of the import and can name the element based on that. However @customElement
will not get this information. So it would need an explicit name which would be unnecessarily verbose if the plugin could figure it out.
from aurelia.
Could @customElement
inspect the class name that it wraps? Use the same kebab case name for element name?
@EisenbergEffect does vCurrent figure it out using (abstracted) module loader by getting current module name?
from aurelia.
For vCurrent, there are no conventions inside the core runtime. So, you either need to explicitly provide the data or use AOT. In this case: https://github.com/aurelia/aurelia/blob/master/packages/examples/test-jit/name-tag.ts however, the plugin itself could pull the element name from the html file name itself (the module name minus the extension), since the plugin gets access to that.
from aurelia.
No problem, we can bake this into auto-trace cli in future. I guess there will be equivalent plugins for parcel and webpack?
I don't think browserify allows you to do that, so browserify can only support inline view template.
from aurelia.
Yes, I was thinking we'd build plugins like this for each loader. It's a bit of work to support several of them but I think it's better for the framework if we keep that out of the core and instead delegate it to the bundlers/loaders.
from aurelia.
This also means any 3rd plugin vNext plugin should be only allowed to build with AOT (or only inline view in jit) to avoid bundler dependency.
from aurelia.
Closing this as no longer relevant.
from aurelia.
Related Issues (20)
- package "exports" field prevents importing dev builds without a bundler HOT 3
- AUR3352: Unexpected state at swap of VPA
- Aurelia Router - Duplicate content
- Portal attribute: aurelia markup <!--au-start--><!--au-end--> are not removed
- Calling store.dispatch in sequence will only set the new state once
- Incorrect injection of parent custom element HOT 6
- New instance injected when using CustomElementDefinition#dependencies HOT 1
- OPEN COLLECTIVE FUNDS HOT 2
- [feature request] state plugin should be able to connect to redux devtools HOT 1
- 🏁 Roadmap & Iteration plan Q1 2024 HOT 3
- flickering caused by aurelia rendering content before clearing the old HOT 2
- [RFC] Custom element bindables take priority over custom attribute
- [refactor] remove define life cycle HOT 1
- Vite plugin for aurelia 1.x? HOT 4
- Router load attribute: broken when using id & parameters.bind HOT 7
- Injecting IHttpClient error after beta 11 update
- Router swallows DI errors HOT 7
- Restrict behavior of custom attribute single value binding and primary bindable HOT 8
- Tweak aurelia package reexports HOT 9
- Validation Package - Email validation HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aurelia.