Skip to content
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

Build toolchain rework #859

Closed
8 tasks done
siarheiyelin opened this issue Dec 7, 2022 · 1 comment · Fixed by #861, #863, #864, #865 or #875
Closed
8 tasks done

Build toolchain rework #859

siarheiyelin opened this issue Dec 7, 2022 · 1 comment · Fixed by #861, #863, #864, #865 or #875
Assignees
Labels
feature New feature or request

Comments

@siarheiyelin
Copy link
Collaborator

siarheiyelin commented Dec 7, 2022

Prerequisites - part 1.

  • Change SCSS imports, so that default export is always used. Reason: to be able to migrate to the recent version
    of style-loader.
  • Change the way how "*.doc.ts(x)" modules export things. More specifically: change export = to export default. Reason: to be able to migrate to the most recent version of babel transformer. See "Caveats" section of this article for more details.
  • Migrate to newever version of Typescript "4.5.4" -> "4.9.3". Reason: to be able to use most recent Babel transform (see details here).

Prerequisites - part 2. Move sources of each module to the "./src" folder.

Purpose of this change:
-- Simplifies configs
-- fixes issues with rollup watch. It's related to how typescript resolves modules, see more details here. The structure of module would look like this:

<module>/assets/**
<module>/build/**
<module>/src/**
<module>/globals.d.ts
<module>/index.tsx
<module>/package.json
<module>/readme.md
  • phase 1. Apply changes to next modules: "uui-core", "uui-components", "uui-timeline", "uui-extra".
    Note: Need to apply changes to next modules as well: "uui", "epam-promo", "loveship". But it's blocked until "feature/uui-themes" branch is merged to develop. Need to wait because of potentially big amount of merge conflicts. This part can be done later.

Migrate "app" module to latest CRA

  • Migrate "app" to the latest CRA. Use CRACO to apply any customizations, but try to minimize the customizations as much as possible.
  • Add possibility to build "app" using "/build" folder of each dependent module. Note: at current moment it evaluates sources of all modules and builds everything as a single project.

Migrate build of modules to Rollup.

Future changes

Simplify Webpack/Craco config:

  • Migrate to newer version of "react-markdown".
  • Move sources of "uui", "epam-promo" and "loveship" modules to the "./src" folder. (phase 2)
  • Move "index.tsx" to "./src" folder in each module.

Improve static code analysis:

  • Migrate from TSLint to ESLint due to issues in TSLint support of latest typescript. (E.g.: "satisfies" keyword).
  • Use Stylelint in webpack dev server. So that we see any issues immediately during development.

Tree shaking:

  • Couldn't set "sideEffects: false" to the modules' "package.json" because we still have files like this: uui-core/src/helpers/screenSize.ts

SCSS

@siarheiyelin siarheiyelin created this issue from a note in Main UUI board (Backlog) Dec 7, 2022
@siarheiyelin siarheiyelin self-assigned this Dec 7, 2022
@siarheiyelin siarheiyelin added the feature New feature or request label Dec 7, 2022
@siarheiyelin siarheiyelin moved this from Backlog to In progress in Main UUI board Dec 7, 2022
siarheiyelin pushed a commit that referenced this issue Dec 7, 2022
…es-change-doc-export

Change the way how "*.doc.ts(x)" modules export things. Related to #859.
@siarheiyelin siarheiyelin linked a pull request Dec 14, 2022 that will close this issue
@siarheiyelin siarheiyelin linked a pull request Dec 15, 2022 that will close this issue
This was linked to pull requests Dec 22, 2022
@NatalliaAlieva
Copy link
Collaborator

Released in 5.0.0 ver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment