New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve asset loading APIs and document them #546
Comments
I want to use ui5-webcomponents with Asp.net Core. Is it possible to use it adding some javascript files and/or css files without using node.js? Is this issue is tracking that? |
Hello @emumanu NodeJS is not required for consuming the web components at all. You just need a bundled version of the components. We are not providing a CDN usage yet. There are several options that you can choose between to get this working.
Here is an example of import 'rollup'; /* eslint no-unused-vars: 0*/
import resolve from 'rollup-plugin-node-resolve';
import json from 'rollup-plugin-json';
import { terser } from "rollup-plugin-terser";
export default {
input: "src/main.js",
output: {
file: "./public/bundle.js",
format: "esm",
sourcemap: true
},
plugins: [
json(),
terser(),
resolve(),
]
}; As starting point you can get https://github.com/rollup/rollup-starter-app
|
Thanks for the tip @MapTo0 It would be good to have an "official development file" with the full bundle, even if its 10MB or more in size. It won't be used for production, but it would be good in order to try ui5 web components in 1 minute. BR |
We are actually not providing as you call it "official development file" as we feel like it will be used in production as well. We even found some usages of the Easiest 1 minute consumption is probably the unpkg.com example https://jsbin.com/sepegiribe/edit?html,output No build tool is required, but huge amount of javascript will be downloaded if several components are imported. |
I think that is a poor decision. If someone can do something wrong does not mean that you should avoid easy usage for other people that know the tradeoffs. You have knives at home, right? Most developers have tight schedules and can't justify extra time to just try a library. Anyway, I'm going to continue using OpenUI5 as UI5 web components doesn't have any form layout and the table it's too basic. |
Any feature requests are welcome :) |
With that implemented, I could invest some time to create asp.net core tag helpers to be able to use the ui5-webcomponents with Visual Studio intellisense support. BTW, does UI5-webcomponents share some source code with SAPUI5/OpenUI5? BR and keep on your good work! |
Implemented. About C# support, please open another issue, if necessary. Regards |
Thank you |
Is your feature request related to a problem? Please describe.
There are four types of assets used by ui5-webcomponents
icons, CLDR, message bundles, theming parameters
There are sensible defaults (CDN or inline imports) so that developing without a build tool is possible, but configuring local bundling is not documented and the APIs are not unified.
Describe the solution you'd like
consistent APIs for configuration asset bundling/loading and documentation for them.
The text was updated successfully, but these errors were encountered: