Use admin instead of public folder for plugins

This commit is contained in:
Pierre Burgy 2017-05-17 16:06:06 +02:00
parent e033ca1a0a
commit 3cbb83d40d
52 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ module.exports = {
pluginFile: async ctx => {
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;
} catch (err) {
ctx.body = ctx.notFound();

View File

@ -111,7 +111,7 @@ module.exports = strapi => {
'plugins/**': cb => {
dictionary.optional({
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.plugins),
excludeDirs: /(public)$/,
excludeDirs: /(public|admin)$/,
filter: /(.+)\.(js|json)$/,
depth: 4
}, cb);