Remove copy-resource, favicon path resolution is already handled by the favicon middleware

This commit is contained in:
Convly 2022-04-04 17:19:51 +02:00
parent a9525c0704
commit 6f5e69b659
3 changed files with 0 additions and 17 deletions

View File

@ -2,7 +2,6 @@
const compilers = require('./compilers'); const compilers = require('./compilers');
const getConfigPath = require('./utils/get-config-path'); const getConfigPath = require('./utils/get-config-path');
const copyResources = require('./utils/copy-resources');
module.exports = async (srcDir, { watch = false } = {}) => { module.exports = async (srcDir, { watch = false } = {}) => {
// TODO: Use the Strapi debug logger instead or don't log at all // TODO: Use the Strapi debug logger instead or don't log at all
@ -12,6 +11,4 @@ module.exports = async (srcDir, { watch = false } = {}) => {
const configPath = getConfigPath(srcDir); const configPath = getConfigPath(srcDir);
compiler.run(configPath); compiler.run(configPath);
await copyResources(srcDir);
}; };

View File

@ -1,12 +0,0 @@
'use strict';
const path = require('path');
const fse = require('fs-extra');
const DEFAULT_RESOURCES_PATHS = ['favicon.ico'];
module.exports = async (dir, resources = DEFAULT_RESOURCES_PATHS) => {
await Promise.all(
resources.map(resourceName => fse.copy(resourceName, path.join(dir, 'dist', resourceName)))
);
};

View File

@ -5,7 +5,6 @@ const isTypeScriptProjectSync = require('./is-typescript-project-sync');
const getConfigPath = require('./get-config-path'); const getConfigPath = require('./get-config-path');
const reportDiagnostics = require('./report-diagnostics'); const reportDiagnostics = require('./report-diagnostics');
const resolveConfigOptions = require('./resolve-config-options'); const resolveConfigOptions = require('./resolve-config-options');
const copyResources = require('./copy-resources');
const formatHost = require('./format-host'); const formatHost = require('./format-host');
module.exports = { module.exports = {
@ -14,6 +13,5 @@ module.exports = {
getConfigPath, getConfigPath,
reportDiagnostics, reportDiagnostics,
resolveConfigOptions, resolveConfigOptions,
copyResources,
formatHost, formatHost,
}; };