ice-migrate-plugin
v1.0.1
Published
a plugin for ice migration
Downloads
4
Readme
ice-migrate-plugin
Intro
A plugin for frontend migration from rax to ice. It provides webpack configures adjustment and page life cycle.
Usage
- Install ice-migrate-plugin
npm install ice-migrate-plugin --save-dev
- Create ./plugin/my-plugin.js
import { plugin } from 'ice-migrate-plugin';
export default plugin;
- Add my-plugin to ice.config.js
import { defineConfig } from '@ice/app';
import type { UserConfig } from '@ice/app';
import myPlugin from './plugin/my-plugin.js';
const config: UserConfig = { "plugins": [] }
if (!config.plugins) {
config.plugins = [];
}
config.plugins.push(myPlugin());
// ...
- If you need to use page life cycle function, there is an example:
import {usePageLifeCycle, usePageShow, usePageHide} from 'ice-migrate-plugin';