Isaac Mills
864b2b484f
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
14 lines
403 B
JavaScript
14 lines
403 B
JavaScript
import {Namer} from '@parcel/plugin';
|
|
import path from 'path';
|
|
|
|
export default new Namer({
|
|
name({bundle}) {
|
|
if (bundle.type === 'png' || bundle.type === 'jpg' || bundle.type == 'svg' || bundle.type === 'ico') {
|
|
let filePath = bundle.getMainEntry().filePath;
|
|
return `images/${path.basename(filePath)}`;
|
|
}
|
|
|
|
// Allow the next namer to handle this bundle.
|
|
return null;
|
|
}
|
|
});
|