mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature: webpack 5
This commit is contained in:
parent
ddc94adbf1
commit
c93803190b
13 changed files with 99 additions and 90 deletions
|
|
@ -8,7 +8,7 @@ import readFilesSync from '@cloudcmd/read-files-sync';
|
|||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const isMap = (a) => /\.map$/.test(a);
|
||||
const isMap = (a) => /\.(map|js)$/.test(a);
|
||||
const not = (fn) => (a) => !fn(a);
|
||||
|
||||
const _isDev = fullstore(process.env.NODE_ENV === 'development');
|
||||
|
|
@ -29,5 +29,7 @@ const readFilesSyncMemo = nanomemoize((isDev) => {
|
|||
.readdirSync(themesDir)
|
||||
.filter(not(isMap));
|
||||
|
||||
return readFilesSync(themesDir, names, 'utf8');
|
||||
const a = readFilesSync(themesDir, names, 'utf8');
|
||||
|
||||
return a;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue