mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 16:16:20 +00:00
Fix localPluginsToCopy
This commit is contained in:
parent
866a612d41
commit
58f0706840
@ -105,13 +105,16 @@ async function createCacheDir(dir) {
|
||||
fs.existsSync(path.resolve(getPkgPath(dep), 'admin', 'src', 'index.js'))
|
||||
);
|
||||
|
||||
const localPluginsToCopy = fs
|
||||
.readdirSync(path.join(dir, 'plugins'))
|
||||
.filter(plugin =>
|
||||
fs.existsSync(
|
||||
path.resolve(dir, 'plugins', plugin, 'admin', 'src', 'index.js')
|
||||
)
|
||||
);
|
||||
let localPluginsToCopy = [];
|
||||
if (fs.existsSync(path.join(dir, 'plugins'))) {
|
||||
localPluginsToCopy = fs
|
||||
.readdirSync(path.join(dir, 'plugins'))
|
||||
.filter(plugin =>
|
||||
fs.existsSync(
|
||||
path.resolve(dir, 'plugins', plugin, 'admin', 'src', 'index.js')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: add logic to avoid copying files if not necessary
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ module.exports = async function createQuickStartProject(scope) {
|
||||
try {
|
||||
await trackUsage({ event: 'willBuildAdmin', scope });
|
||||
|
||||
await execa('npm', ['run', 'build'], {
|
||||
await execa('npm', ['run', 'build', '--', '--no-optimization'], {
|
||||
stdio: 'inherit',
|
||||
cwd: scope.rootPath,
|
||||
env: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user