addExtension.ts 261 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 import { extname } from 'path'; import { AddExtension } from './pluginutils'; const addExtension: AddExtension = function addExtension(filename, ext = '.js') { if (!extname(filename)) filename += ext; return filename; }; export { addExtension as default };