Skip to content

Latest commit

 

History

History
134 lines (94 loc) · 3.09 KB

File metadata and controls

134 lines (94 loc) · 3.09 KB

hyper-pwt

hyper-pwt

A faster, more modern, superior alternative for Mendix PWT.

How to migration to hyper-pwt?

Bascially, hyper-pwt is a drop-in replacement for Mendix PWT.

First, install hyper-pwt from npm.

npm install --dev @repixelcorp/hyper-pwt

Second, replace pluggable-widgets-tools to hyper-pwt in widget's package.json.

{
  "scripts": {
    "dev": "hyper-pwt start:web",
    "build": "hyper-pwt build:web",
    "lint": "hyper-pwt lint",
    "lint:fix": "hyper-pwt lint:fix",
    "prerelease": "npm run lint",
    "release": "hyper-pwt release:web"
  }
}

Third, open tsconfig.json and change extends to hyper-pwt like below.

{
  "extends": "@repixelcorp/hyper-pwt/src/configurations/typescript/tsconfig.base",
  "include": ["./src", "./typings"]
}

I use custom rollup configuration.

First, proceed with the basic replacement process.

If the widget does not function properly after installing hyper-pwt, you can customize your Vite configuration by referring to the “Custom build configurations” section.

Custom build configurations

Web

Create vite.config.mjs on your pwt root directory.

import { definePWTConfig } from '@repixelcorp/hyper-pwt';

export default definePWTConfig(() => {
    return {
      // Your custom configuration in here.
    };
});

hyper-pwt uses the @vitejs/plugin-react plugin. The settings for this plugin can be changed as follows.

import { definePWTConfig } from '@repixelcorp/hyper-pwt';

export default definePWTConfig(() => {
    return {
        reactPluginOptions: {
          jsxRuntime: 'classic'
        }
    };
});

definePWTConfig also supports asynchronous mode. It can be used as follows.

import { definePWTConfig } from '@repixelcorp/hyper-pwt';

export default definePWTConfig(async () => {
    const promise = await somethingPromise();

    return {
    };
});

Native

TODO

Performance compare with Mendix PWT

TODO

Support pwt tasks

  • start:web
  • start:native
  • build:web
  • build:native
  • release:web
  • release:native
  • lint
  • lint:fix
  • format
  • test:unit:web
  • test:unit:native
  • Widget Generator

Support platforms

  • Web
    • Basic Functions
    • Linter and Formatting
    • TDD Functions
  • Native
    • Basic Functions
    • Linter and Formatting
    • TDD Functions

License

@repixelcorp/hyper-pwt is distributed under the MIT License.

Please refer to the LICENSE.

Disclaimers

Neither Repixel Co., Ltd., nor the project maintainers or contributors, are responsible for any problems arising from the use of this software. The user is entirely responsible.