nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit c4f33454dbfc8afc18c8fedbb36edcc94778ab3a
parent 980496eaadedd8367f90df4505d68e8eb91ae569
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Mon, 21 Nov 2016 00:40:23 +0300

[webpack config] pack images as data-uris

Diffstat:
Mconfig/webpack.config.dev.js | 4++--
Mconfig/webpack.config.prod.js | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js @@ -130,7 +130,7 @@ module.exports = { // When you `import` an asset, you get its (virtual) filename. // In production, they would get copied to the `build` folder. { - test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/, + test: /\.(eot|otf|webp|ttf|woff|woff2)(\?.*)?$/, loader: 'file', query: { // name: 'static/media/[name].[hash:8].[ext]' @@ -140,7 +140,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|wav|mp3|m4a|aac|oga)(\?.*)?$/, + test: /\.(png|gif|ico|jpg|svg)(\?.*)?$/, loader: 'url', query: { limit: 10000, diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js @@ -140,7 +140,7 @@ module.exports = { // "file" loader makes sure those assets end up in the `build` folder. // When you `import` an asset, you get its filename. { - test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/, + test: /\.(eot|otf|webp|ttf|woff|woff2)(\?.*)?$/, loader: 'file', query: { name: 'static/media/[name].[hash:8].[ext]' @@ -149,7 +149,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|wav|mp3|m4a|aac|oga)(\?.*)?$/, + test: /\.(png|gif|ico|jpg|svg)(\?.*)?$/, loader: 'url', query: { limit: 10000,