mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 00:03:40 +00:00
fix(plugin generator): support valid package names for pluginId
Update the current replace regex to support both scoped package and old strapi plugin names.
This commit is contained in:
parent
ce09d38972
commit
f7dc4be726
@ -1,5 +1,5 @@
|
|||||||
const pluginPkg = require('../../package.json');
|
const pluginPkg = require('../../package.json');
|
||||||
|
|
||||||
const pluginId = pluginPkg.name.replace(/^@strapi\/plugin-/i, '');
|
const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
|
||||||
|
|
||||||
module.exports = pluginId;
|
module.exports = pluginId;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user