@quasar/app-webpack
Version:
Quasar Framework App CLI with Webpack
16 lines (13 loc) • 323 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
}
}
}