Add mp3 to project, make binary files available in rsg on util
This commit is contained in:
parent
104a1ca5d4
commit
ed12e1b076
3 changed files with 24 additions and 1 deletions
BIN
fixtures/incompetech-com-Agnus-Dei-X.mp3
Normal file
BIN
fixtures/incompetech-com-Agnus-Dei-X.mp3
Normal file
Binary file not shown.
|
@ -12,6 +12,29 @@ import ReactDOM from 'react-dom';
|
|||
import { Message } from '../conversation/Message';
|
||||
import { Reply } from '../conversation/Reply';
|
||||
|
||||
|
||||
// TypeScript wants two things when you import:
|
||||
// 1) a normal typescript file
|
||||
// 2) a javascript file with type definiitions
|
||||
// Anything else will raise an error, that it can't find the module. And so, we ignore...
|
||||
|
||||
// @ts-ignore
|
||||
import gif from '../../../fixtures/giphy-GVNvOUpeYmI7e.gif';
|
||||
// @ts-ignore
|
||||
import mp3 from '../../../fixtures/incompetech-com-Agnus-Dei-X.mp3';
|
||||
// @ts-ignore
|
||||
import txt from '../../../fixtures/lorem-ipsum.txt';
|
||||
// @ts-ignore
|
||||
import mp4 from '../../../fixtures/pixabay-Soap-Bubble-7141.mp4';
|
||||
|
||||
export {
|
||||
mp3,
|
||||
gif,
|
||||
mp4,
|
||||
txt,
|
||||
};
|
||||
|
||||
|
||||
// Required, or TypeScript complains about adding keys to window
|
||||
const parent = window as any;
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
// To test handling of attachments, we need arraybuffers in memory
|
||||
test: /\.(gif|mp3|mp4)$/,
|
||||
test: /\.(gif|mp3|mp4|txt)$/,
|
||||
loader: 'arraybuffer-loader',
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue