A faster, more modern, superior alternative for Mendix PWT.
Bascially, hyper-pwt is a drop-in replacement for Mendix PWT.
First, install hyper-pwt from npm.
npm install --dev @repixelcorp/hyper-pwtSecond, 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"]
}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.
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 {
};
});TODO
TODO
- start:web
- start:native
- build:web
- build:native
- release:web
- release:native
- lint
- lint:fix
- format
- test:unit:web
- test:unit:native
- Widget Generator
- Web
- Basic Functions
- Linter and Formatting
- TDD Functions
- Native
- Basic Functions
- Linter and Formatting
- TDD Functions
@repixelcorp/hyper-pwt is distributed under the MIT License.
Please refer to the LICENSE.
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.