diff --git a/config/eslint.js b/config/eslint.js index d83c66a85f7..ce78a72e72e 100644 --- a/config/eslint.js +++ b/config/eslint.js @@ -47,7 +47,7 @@ module.exports = { settings: { 'import/ignore': [ 'node_modules', - '\\.(json|css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$', + '\\.(json|css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$', ], 'import/extensions': ['.js'], 'import/resolver': { diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 34bda5590a3..86f592ba5b8 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -147,7 +147,7 @@ module.exports = { // "url" loader works just like "file" loader but it also embeds // assets smaller than specified size as data URLs to avoid requests. { - test: /\.(mp4|webm)(\?.*)?$/, + test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/, loader: 'url', query: { limit: 10000, diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index c03b6ef272f..2a482f9547e 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -157,7 +157,7 @@ module.exports = { // "url" loader works just like "file" loader but it also embeds // assets smaller than specified size as data URLs to avoid requests. { - test: /\.(mp4|webm)(\?.*)?$/, + test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/, loader: 'url', query: { limit: 10000, diff --git a/scripts/utils/createJestConfig.js b/scripts/utils/createJestConfig.js index 8d3b60f8614..ee2f9652bd7 100644 --- a/scripts/utils/createJestConfig.js +++ b/scripts/utils/createJestConfig.js @@ -21,7 +21,7 @@ module.exports = (resolve, rootDir) => { const config = { moduleFileExtensions: ['jsx', 'js', 'json'], moduleNameMapper: { - '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm)$': resolve('config/jest/FileStub.js'), + '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'), '^.+\\.css$': resolve('config/jest/CSSStub.js') }, scriptPreprocessor: resolve('config/jest/transform.js'),