Comments (5)
Ah great! That would make it very straightforward. I haven't done any webpack loader development but I can make a go at implementing it.
from components.js.
That would be awesome, please keep us updated!
from components.js.
For the browser, you typically want to optimize for size, so it makes sense to resolve the dependencies at compile time, which also gives a performance benefit because it does not need to be performed at runtime.
Additionally, webpack etc. have to know which dependencies to ship to the browser; they can't be resolved at runtime like Node.js does.
So doing this is definitely the recommended way; and for me the only why how I can imagine it working in the browser. Unless @rubensworks sees other ways.
from components.js.
Thanks for the speedy reply. For production it would definitely need to be compiled. I'm really just wondering about ergonomics during development. I wonder would it make sense if there was a custom webpack loader? The webpack documentation on writing a custom module loader mention give special mention to loaders that use the file system, saying they should integrate with webpack's module system. https://webpack.js.org/contribute/writing-a-loader/#module-dependencies So maybe it would be a matter of translating the componentsjs module loading into webpack loading. Easier said than done of course :-)
from components.js.
Ah yes, the script that interprets a Components.js configuration into JavaScript code could definitely be a webpack loader; it would not need to be that hard. Under the hood, it can remain the same; it should just return the JavaScript to webpack rather than outputting it.
from components.js.
Related Issues (20)
- Generics issue when building in different Monrepo HOT 3
- Invalid predicate IRI for JSON field HOT 6
- Accept strings as JSON HOT 5
- Compat URLs during error reporting HOT 1
- Custom components.js serialization HOT 9
- Emit warning on possibly invalid terms HOT 1
- Could not find a valid import path for src/lib/MyActor.jsonld. 'lsd:importPaths' in package.json may be invalid. HOT 12
- Unclear error message when a component is undefined HOT 6
- The basic typescript example in documentation doesn't seem to work HOT 10
- Append to array or collection of a component configuration HOT 2
- Invalid Predicate IRI HOT 9
- Raw value references cannot be used as keys in key/value objects HOT 4
- Some kind of package names are not allowed if it has a substring match with an existing components.js package? HOT 4
- Interfaces exported in a list seem to be ignored when generating component definitions
- Disable remote context lookups by default
- Race condition with raw values HOT 2
- Long version of parameter doesn't work HOT 8
- Allow modifying arrays more specifically HOT 5
- Error from `postinstall` with version 5.5.0 from NPM HOT 2
- Detected remote context lookup on broken softlinks in node_modules
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 components.js.