[TIMOB-27429] Webpack: Integration into the CLI build command
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-08-25T00:36:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | CLI |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2019-09-30T11:27:24.000+0000 |
Updated | 2020-08-25T00:36:22.000+0000 |
Description
To integrate Webpack support in the CLI we need the following changes to our build:
- A new hook that communicates with appcd-plugin-webpack to get webpack build results.
- Assets generated by Webpack need to be excluded from our existing JavaScript processing from node-titanium-sdk.
- Bootstrap files will be loaded dynamically during runtime. These files need to be loaded through a [dynamic expression in import()](https://webpack.js.org/api/module-methods/#dynamic-expressions-in-import).
- (Optional) Provide the raw sources of our common JavaScript sources. Currently we bundle all files and the deprecated
@babel/polyfill
via rollup to create the ti.main.js
. This could be optimized through a seperate webpack entry point which would allow to load seperate polyfills based in our internal usage, and end-user code usage.
node-titanium-sdk PR to add a new
webpack
section to tiapp.xml: https://github.com/appcelerator/node-titanium-sdk/pull/128PR: https://github.com/appcelerator/titanium_mobile/pull/11346
Closing.