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

OHRM5X-959: Vite migration #670

Merged
merged 30 commits into from
Feb 14, 2023
Merged

Conversation

Super-Chama
Copy link
Member

@Super-Chama Super-Chama commented Jan 11, 2023

Checklist

  • Storybook stories are added/updated for the changed areas
  • Code is linted properly
  • Developer testing is done for the affected areas
  • Package version updated

@Super-Chama
Copy link
Member Author

Super-Chama commented Jan 12, 2023

OXD V2 Highlights

Migrate from vue-cli to create-vue

Due to vue-cli being put on maintenance by the vue framework team we have decided to switch to the suggested create-vue scaffolding tool. Most notable change here is moving away from the underlying js bundler (Webpack 5 to Vite.js)

Migrate from Storybook 6.X to 7.X

Storybook 7X is now powered with vite and currently in public beta.

Migrate from Jest to Vitest as unit test runner

Vitest with vue test utils are the latest recommended unit test tools

Type Check

Workflow added for type checking.

ESM Build

// pending

New folder structure

1.X Folder structure

├── components
│   ├── package.json
│   └── src
│       ├── core
│       │   └── components
│       │      └── Alert
│       │         ├── alert.scss
│       │         ├── Alert.vue
│       │         ├── __tests__
│       │         │   ├── alert.spec.ts
│       │         ├── types.ts
│       │         └── _variables.scss
│       ├── assets
│       ├── composables
│       ├── directives
│       ├── mixins
│       ├── services
│       ├── styles
│       └── utils
├── storybook
│   ├── package.json
│   ├── public
│   └── stories
│       └── core
│           └── components
│               └── Alert
│                   ├── AlertContainer.vue
│                   └── Alert.stories.js
├── package.json
├── scripts
└── yarn.lock

2.X Proposed structure


├── src
│   ├── components
│   │   ├── Alert
│   │      ├── alert.scss
│   │      ├── Alert.vue
│   │      ├── stories
|   |      |   ├── AlertContainer.vue
│   │      │   └── Alert.stories.ts
│   │      └── __tests__
│   │      |   └── alert.spec.ts
│   │      ├── types.ts
│   │      └── _variables.scss
|   ├── composables
│   ├── assets
│   ├── directives
│   ├── mixins
│   ├── services
│   ├── styles
│   └── utils
├── package.json
└── yarn.lock

@Super-Chama Super-Chama changed the title OHRM5X-1888: Vite migration init OHRM5X-959: Vite migration Jan 12, 2023
@Super-Chama Super-Chama force-pushed the develop branch 2 times, most recently from f1be0ca to f75d514 Compare January 16, 2023 04:49
@Super-Chama
Copy link
Member Author

Currently static assets are bundled together in js/css. this behaviour is not ideal due to large file size of resultant builds. Waiting for vitejs/vite#9734

@Super-Chama Super-Chama force-pushed the develop branch 9 times, most recently from 4679a98 to a56239b Compare January 27, 2023 09:25
@Super-Chama Super-Chama marked this pull request as ready for review February 2, 2023 05:37
Copy link
Member

@RajithaKumara RajithaKumara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we check how to handle license in the build

@RajithaKumara RajithaKumara merged commit 1c4ad5c into orangehrm:develop Feb 14, 2023
@Super-Chama Super-Chama deleted the develop branch February 14, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants