mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 20:49:06 +01:00
19 lines
337 B
TypeScript
19 lines
337 B
TypeScript
/**
|
|
* Replace base64 symbols
|
|
*/
|
|
|
|
import * as fs from 'fs';
|
|
|
|
export default () => ({
|
|
enforce: 'pre',
|
|
test: /\.(vue|js)$/,
|
|
exclude: /node_modules/,
|
|
loader: 'string-replace-loader',
|
|
query: {
|
|
search: /%base64:(.+?)%/g,
|
|
replace: (_, key) => {
|
|
return fs.readFileSync(__dirname + '/../../../src/web/' + key, 'base64');
|
|
}
|
|
}
|
|
});
|