mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 23:57:32 +00:00
Fix PR feedback
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
5491aa7a81
commit
3d193b3137
@ -11,6 +11,8 @@ const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
|
||||
const alias = require('./webpack.alias');
|
||||
const getClientEnvironment = require('./env');
|
||||
|
||||
const EE_REGEX = /from.* ['"]ee_else_ce\//;
|
||||
|
||||
module.exports = ({
|
||||
entry,
|
||||
cacheDir,
|
||||
@ -92,11 +94,7 @@ module.exports = ({
|
||||
try {
|
||||
const fileContent = fse.readFileSync(filePath).toString();
|
||||
|
||||
if (fileContent.match(/from.* ['"]ee_else_ce\//)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return EE_REGEX.test(fileContent);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user