Skip to content

Commit

Permalink
Use file loader for fonts and videos
Browse files Browse the repository at this point in the history
  • Loading branch information
tchock committed Jan 26, 2021
1 parent 58cb0d2 commit b3b8e24
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
11 changes: 8 additions & 3 deletions packages/core/.bojagi/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,23 @@ module.exports = {
]
},
{
test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/,
test: /\.(svg|ico|jpg|jpeg|png|apng|gif|webp|cur|ani|pdf)(\?.*)?$/,
loader: 'url-loader',
options: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]', esModule: false }
},
{
test: /\.(eot|otf|ttf|woff|woff2)(\?.*)?$/,
loader: 'file-loader',
options: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]', esModule: false }
},
{
test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
loader: 'url-loader',
loader: 'file-loader',
query: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]' }
}
],
},
resolve: {
extensions: ['mjs', '.ts', '.js', '.json', '.tsx', '.jsx', '.css'],
}
}
}
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
"license": "MIT",
"dependencies": {
"@bojagi/cli": "^0.12.5",
"@react95/clippy": "^1.0.3",
"@react95/icons": "^1.0.3",
"@styled-system/prop-types": "^5.1.5",
Expand Down
34 changes: 16 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1046,14 +1046,14 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bojagi/cli@^0.12.4":
version "0.12.4"
resolved "https://registry.yarnpkg.com/@bojagi/cli/-/cli-0.12.4.tgz#1fa25a9ac92cc7536bbf89ce25c91570dacf84e3"
integrity sha512-LqpACkB161m0kFrS559UAgTBXdY4fJDcghHyPmDEMD53kIo+SzGC/qZUnW8+SrHUwUZoQC2fBnZLyv4XXmSpuQ==
"@bojagi/cli@^0.12.5":
version "0.12.5"
resolved "https://registry.yarnpkg.com/@bojagi/cli/-/cli-0.12.5.tgz#3e2b7426684c1dadedb19382ed9bafa7ac635969"
integrity sha512-OGJfAbUUgxR92wAHRK5di62/yeLqGVUpYXVYLG5BeYvZp6qVCaJHOi1v/U5vZ+jDo0gaXN1HyRCoRaKH182R+w==
dependencies:
"@bojagi/types" "^0.9.0"
adm-zip "^0.4.13"
axios "^0.19.2"
axios "^0.21.1"
chalk "2.4.2"
commander "4.1.1"
connect-history-api-fallback "^1.6.0"
Expand Down Expand Up @@ -4400,12 +4400,12 @@ axe-core@^4.0.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.1.tgz#70a7855888e287f7add66002211a423937063eaf"
integrity sha512-5Kgy8Cz6LPC9DJcNb3yjAXTu3XihQgEdnIg50c//zOC/MyLP0Clg+Y8Sh9ZjjnvBrDZU4DgXS9C3T9r4/scGZQ==

axios@^0.19.2:
version "0.19.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
follow-redirects "1.5.10"
follow-redirects "^1.10.0"

axobject-query@^2.2.0:
version "2.2.0"
Expand Down Expand Up @@ -6470,7 +6470,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8:
dependencies:
ms "2.0.0"

debug@3.1.0, debug@=3.1.0:
debug@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
Expand Down Expand Up @@ -7952,18 +7952,16 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@1.5.10:
version "1.5.10"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
dependencies:
debug "=3.1.0"

follow-redirects@^1.0.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7"
integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==

follow-redirects@^1.10.0:
version "1.13.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147"
integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==

for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
Expand Down

0 comments on commit b3b8e24

Please sign in to comment.