chore: init plugins and ministar

pull/13/head
moonrailgun 4 years ago
parent 4325589a5d
commit 1e7e8318f1

@ -18,6 +18,7 @@
"clsx": "^1.1.1", "clsx": "^1.1.1",
"is-hotkey": "^0.2.0", "is-hotkey": "^0.2.0",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"mini-star": "^0.0.24",
"p-min-delay": "^4.0.0", "p-min-delay": "^4.0.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",

@ -0,0 +1,7 @@
{
"name": "@plugins/com.msgbyte.webpanel",
"main": "src/index.ts",
"version": "0.0.0",
"private": true,
"dependencies": {}
}

@ -0,0 +1 @@
console.log('Hello World!');

@ -0,0 +1,6 @@
{
"compilerOptions": {
"rootDir": "./src",
"baseUrl": "./src"
}
}

@ -3,10 +3,21 @@ import './dev';
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { App } from './App'; import { App } from './App';
import { initMiniStar } from 'mini-star';
import 'antd/dist/antd.css'; import 'antd/dist/antd.css';
import './styles/antd/index.less'; import './styles/antd/index.less';
import 'tailwindcss/tailwind.css'; import 'tailwindcss/tailwind.css';
import './styles/global.less'; import './styles/global.less';
ReactDOM.render(<App />, document.querySelector('#app')); // 先加载插件再开启应用
initMiniStar({
plugins: [
{
name: 'com.msgbyte.webpanel',
url: '/plugins/com.msgbyte.webpanel/index.js',
},
],
}).then(() => {
ReactDOM.render(<App />, document.querySelector('#app'));
});

@ -47,6 +47,7 @@ const config: Configuration = {
devServer: { devServer: {
port: PORT, port: PORT,
historyApiFallback: true, historyApiFallback: true,
contentBase: './dist',
}, },
module: { module: {
rules: [ rules: [

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save