Code Monkey home page Code Monkey logo

my-es6-ui5-app's Introduction

Hi there ๐Ÿ‘‹

my-es6-ui5-app's People

Contributors

petermuessig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

my-es6-ui5-app's Issues

UI5 Tooling: Extend custom task to use of babel polyfills

Hi Peter,

I've been playing around with your ES6 UI5 app sample and got stuck at when I tried to include polyfills so that such an app should be shipped to browsers like ie11.

I started by adding the according dependency...

npm install --save @babel/polyfill

The babel config that I used for the builder Transpile task looks like this:

{
	sourceMap: false,
	presets: [
		["@babel/preset-env", {
			targets: {
				"ie": "11"
			},
			useBuiltIns: "usage",
			modules: "amd"
		}]
	],
	plugins: [
		["@babel/plugin-transform-modules-commonjs", {
			"strictMode": false
		}]

	]
}

However, this causes the polyfill imports to be added to the top of the js files as require calls, such as this, which can not be understood by the browser.

require("core-js/modules/es6.array.find");
require("core-js/modules/es6.regexp.constructor");

sap.ui.define(["sap/ui/model/json/JSONModel"], function(e) {
    "use strict";
    // ....
}

But even if the polyfills would be imported as AMD modules, I wonder if those files would be available in a build result and be respected by a ui5 self-contained build?

I'm wondering if you could give any insights and information on how such an extended setup of your sample project could look like?

ErrorHandler-dbg.js transpiles with mixed line feeds?

Hi Peter,

First of all thanks for sharing your transpile script! In many projects it works perfectly, but I have a master detail based on 1.60 template and the ErrorHandler-dbg.js cannot be uploaded to the abap stack.

The ADT service rejects the file with the following message:
<?xml version="1.0" encoding="utf-8"?><exc:exception xmlns:exc="http://www.sap.com/abapxml/types/communicationframework"><namespace id="com.sap.adt"/><type id="ExceptionResourceCreationFailure"/><message lang="EN">File contains different line feeds. Mixed line feeds are not supported</message><localizedMessage lang="EN">File contains different line feeds. Mixed line feeds are not supported</localizedMessage><properties/></exc:exception>

I removed the transpile script from the ui5.yaml file and the app is being uploaded. Another test shows that when I open up the ErrorHandler-dbg.js file from the dist folder and save it in VSCode, the upload works.

Any clues?

Cheers,
Noel

Why still MVC?

Why are you still basin` you apps architecture on the MVC pattern?
The current way of structuring the app and the data flow is much better.
Are you considering moving to 'group by feature' file structure and to one-directional data flow like the flux paradigm?

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.