mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +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 => {
|
||||
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();
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user