@quasar/app-webpack
Version:
Quasar Framework App CLI with Webpack
13 lines (10 loc) • 320 B
JavaScript
const { existsSync } = require('node:fs')
const extensions = [ '', '.js', '.ts', '.jsx', '.tsx' ]
module.exports.resolveExtension = function resolveExtension (file, extList = extensions) {
for (const ext of extList) {
const entry = file + ext
if (existsSync(entry) === true) {
return entry
}
}
}