mirror of
https://github.com/strapi/strapi.git
synced 2025-11-30 17:18:24 +00:00
Use admin instead of public folder for plugins
This commit is contained in:
parent
e033ca1a0a
commit
3cbb83d40d
@ -20,7 +20,7 @@ module.exports = {
|
|||||||
|
|
||||||
pluginFile: async ctx => {
|
pluginFile: async ctx => {
|
||||||
try {
|
try {
|
||||||
const file = fs.readFileSync(path.resolve(process.cwd(), 'plugins', ctx.params.plugin, 'public', 'build', 'main.js'));
|
const file = fs.readFileSync(path.resolve(process.cwd(), 'plugins', ctx.params.plugin, 'admin', 'build', 'main.js'));
|
||||||
ctx.body = file;
|
ctx.body = file;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
ctx.body = ctx.notFound();
|
ctx.body = ctx.notFound();
|
||||||
|
|||||||
@ -111,7 +111,7 @@ module.exports = strapi => {
|
|||||||
'plugins/**': cb => {
|
'plugins/**': cb => {
|
||||||
dictionary.optional({
|
dictionary.optional({
|
||||||
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.plugins),
|
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.plugins),
|
||||||
excludeDirs: /(public)$/,
|
excludeDirs: /(public|admin)$/,
|
||||||
filter: /(.+)\.(js|json)$/,
|
filter: /(.+)\.(js|json)$/,
|
||||||
depth: 4
|
depth: 4
|
||||||
}, cb);
|
}, cb);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user