Skip to content

Commit a5bf074

Browse files
danharpergaearon
authored andcommitted
add audio support (#665)
1 parent 16a9724 commit a5bf074

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

config/eslint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = {
4747
settings: {
4848
'import/ignore': [
4949
'node_modules',
50-
'\\.(json|css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$',
50+
'\\.(json|css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$',
5151
],
5252
'import/extensions': ['.js'],
5353
'import/resolver': {

config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ module.exports = {
147147
// "url" loader works just like "file" loader but it also embeds
148148
// assets smaller than specified size as data URLs to avoid requests.
149149
{
150-
test: /\.(mp4|webm)(\?.*)?$/,
150+
test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
151151
loader: 'url',
152152
query: {
153153
limit: 10000,

config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ module.exports = {
157157
// "url" loader works just like "file" loader but it also embeds
158158
// assets smaller than specified size as data URLs to avoid requests.
159159
{
160-
test: /\.(mp4|webm)(\?.*)?$/,
160+
test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
161161
loader: 'url',
162162
query: {
163163
limit: 10000,

scripts/utils/createJestConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = (resolve, rootDir) => {
2121
const config = {
2222
moduleFileExtensions: ['jsx', 'js', 'json'],
2323
moduleNameMapper: {
24-
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': resolve('config/jest/FileStub.js'),
24+
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'),
2525
'^.+\\.css$': resolve('config/jest/CSSStub.js')
2626
},
2727
scriptPreprocessor: resolve('config/jest/transform.js'),

0 commit comments

Comments
 (0)