mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 23:24:03 +00:00
Update plugin generators
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
6e4604d662
commit
55ad0c0181
@ -1,9 +1,6 @@
|
||||
import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
||||
import pluginPkg from '../../package.json';
|
||||
import pluginId from './pluginId';
|
||||
|
||||
import App from './pages/App';
|
||||
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
const icon = pluginPkg.strapi.icon;
|
||||
const name = pluginPkg.strapi.name;
|
||||
@ -17,7 +14,11 @@ export default {
|
||||
id: `${pluginId}.plugin.name`,
|
||||
defaultMessage: 'My plugin',
|
||||
},
|
||||
Component: App,
|
||||
Component: async () => {
|
||||
const component = await import(/* webpackChunkName: "my-plugin" */ './pages/App');
|
||||
|
||||
return component;
|
||||
},
|
||||
permissions: [],
|
||||
});
|
||||
app.registerPlugin({
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
||||
import pluginPkg from '../../package.json';
|
||||
import pluginId from './pluginId';
|
||||
import App from './containers/App';
|
||||
import Initializer from './containers/Initializer';
|
||||
|
||||
import Initializer from './components/Initializer';
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
const icon = pluginPkg.strapi.icon;
|
||||
const name = pluginPkg.strapi.name;
|
||||
@ -17,7 +15,11 @@ export default {
|
||||
id: `${pluginId}.plugin.name`,
|
||||
defaultMessage: name,
|
||||
},
|
||||
Component: App,
|
||||
Component: async () => {
|
||||
const component = await import(/* webpackChunkName: "[request]" */ './pages/App');
|
||||
|
||||
return component;
|
||||
},
|
||||
permissions: [
|
||||
// Uncomment to set the permissions of the plugin here
|
||||
// {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user