lexoyo Here is the update,
I have created a Silex client plugin using the Silex plugin starter kit. I added the block there and everything works on the plugin side. I can confirm via the screenshot below. I have added the flexbox and Grapesjs Basic Block.
Next, installed and added the package in client-config and exposed via server static file plugin just like the cms.
// my .silex-client config file
import SilexCMS from './js/silex-cms/client.js'
import BlockExtra from './js/silex-blocks-extra/client.js'
export default function(config, options) {
config.addPlugin(BlockExtra, {})
// CMS Plugin
config.addPlugin(SilexCMS, {
dataSources: [],
})
config.on('silex:startup:end', () => {
const editor = config.getEditor()
editor.on('storage:end:store', async () => {
editor.runCommand('publish')
})
})
}
// my .silex-server.js config file
const StaticPlugin = require('@silexlabs/silex/dist/plugins/server/plugins/server/StaticPlugin').default
const node_modules = require('node_modules-path')
//console.log('node_modules ->', node_modules('@silexlabs/silex-cms'))
module.exports = async function(config, options) {
await config.addPlugin(StaticPlugin, {
routes: [
{
route: '/js/silex-cms/',
path: node_modules('@silexlabs/silex-cms') + '/@silexlabs/silex-cms/dist/',
},
{
route: '/js/silex-blocks-extra/',
path: node_modules('silex-blocks-extra') + '/silex-blocks-extra/dist/',
},
],
})
}
The plugin loads fine as there is no loading error! But the blocks are not showing! Any idea how to debug the plugin
load ?