ui5-tooling
ui5-tooling copied to clipboard
Content of splitted modules differ each build
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
- clone the project
ui5-builder
- adapt
libraryHTree
intest/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",
]
}
};
- 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
- [x] ui5-builder
- [ ] ui5-server
- [ ] ui5-cli
- [ ] ui5-fs
- [ ] ui5-project
- [ ] ui5-logger