Fix webpack config for windows

This commit is contained in:
Saoud Rizwan
2024-08-31 03:08:25 -04:00
parent c92e9a1d56
commit 81fa5a67a4

View File

@@ -25,7 +25,8 @@ const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin")
const path = require("path")
const fs = require("fs")
// Get all files in the shared directory
const sharedDir = path.resolve(__dirname, "../../src/shared")
const sharedDir = path.resolve(__dirname, "..", "..", "src", "shared")
function getAllFiles(dir) {
let files = []
fs.readdirSync(dir).forEach((file) => {
@@ -33,7 +34,7 @@ function getAllFiles(dir) {
if (fs.statSync(filePath).isDirectory()) {
files = files.concat(getAllFiles(filePath))
} else {
const withoutExtension = filePath.split(".")[0]
const withoutExtension = path.join(dir, path.parse(file).name)
files.push(withoutExtension)
}
})