ui5-tooling icon indicating copy to clipboard operation
ui5-tooling copied to clipboard

Content of splitted modules differ each build

Open devtomtom opened this issue 6 years ago • 0 comments

Expected Behavior

When splitting modules in different parts by setting the numberOfParts property in the ui5.yaml, it is expected that the resulting modules are always the same.

Current Behavior

The resulting parts differ each time when building the project depending on the file sizes.

Steps to reproduce the issue

  1. clone the project ui5-builder
  2. adapt libraryHTree in test/lib/builder/builder.js to
const libraryHTree = {
	"id": "library.h",
	"version": "1.0.0",
	"path": libraryHPath,
	"dependencies": [],
	"_level": 0,
	"specVersion": "0.1",
	"type": "library",
	"metadata": {
		"name": "library.h",
		"copyright": "Some fancy copyright"
	},
	"resources": {
		"configuration": {
			"paths": {
				"src": "main/src",
				"test": "main/test"
			}
		},
		"pathMappings": {
			"/resources/": "main/src",
			"/test-resources/": "main/test"
		}
	},
	"builder": {
		"bundles": [{
			"bundleDefinition": {
				"name": "library/h/customBundle.js",
				"defaultFileTypes": [".js"],
				"sections": [{
					"mode": "preload",
					"filters": [
						"library/h/some.js",
						"library/h/library.js",
						"library/h/file.js",
						"!library/h/not.js"
					],
					"resolve": false,
					"renderer": false
				}]
			},
			"bundleOptions": {
				"optimize": true,
				"usePredefinedCalls": true,
                                 "numberOfParts": 4
			}
		}],
		"componentPreload": [
			"components",
			"components/subcomponent1",
			"components/subcomponent2",
			"components/subcomponent3",
		]
	}
};
  1. run npm run unit-inspect test/lib/builder/builder.js

Context

  • OS/Platform: MacOS
  • Node.js Version: v.8.10.0
  • npm Version: 5.6.0

Affected components

devtomtom avatar Apr 27 '18 13:04 devtomtom