badguardhome/client/webpack.dev.js

68 lines
1.7 KiB
JavaScript
Raw Normal View History

2018-08-30 14:25:33 +00:00
const merge = require('webpack-merge');
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
const yaml = require('js-yaml');
const fs = require('fs');
2018-08-30 14:25:33 +00:00
const common = require('./webpack.common.js');
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
const { BASE_URL } = require('./constants');
const ZERO_HOST = '0.0.0.0';
const LOCALHOST = '127.0.0.1';
const DEFAULT_PORT = 80;
/**
* Get document, or throw exception on error
* @returns {{bind_host: string, bind_port: number}}
*/
const importConfig = () => {
try {
const doc = yaml.safeLoad(fs.readFileSync('../AdguardHome.yaml', 'utf8'));
const { bind_host, bind_port } = doc;
return {
bind_host,
bind_port,
};
} catch (e) {
console.error(e);
return {
bind_host: ZERO_HOST,
bind_port: DEFAULT_PORT,
};
}
};
const getDevServerConfig = (proxyUrl = BASE_URL) => {
const { bind_host: host, bind_port: port } = importConfig();
const { DEV_SERVER_PORT } = process.env;
const devServerHost = host === ZERO_HOST ? LOCALHOST : host;
const devServerPort = DEV_SERVER_PORT || port + 8000;
return {
hot: true,
+ client, querylog: Add blocked service filter support Close #2124 Squashed commit of the following: commit 574726e88e4fe7df745dfc964706e1e26f8da59f Merge: 3bc770fb dc61744d Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 19:32:38 2020 +0300 Merge branch 'master' into feature/2124 commit 3bc770fba6d06bbd965ee181aed7b0a050175f58 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 11:22:07 2020 +0300 minor commit 90c0d739d1bd09dbcf5f27ff9e6c3f761bf81686 Merge: 5d1f2642 1d36abd1 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 11:17:24 2020 +0300 Merge branch 'master' into feature/2124 commit 5d1f264212686ac7ecab30401b4f0e3c020dbee9 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 17:23:08 2020 +0300 Display elapsed if there is no service_name in blocked service commit af86cedc31d566238764e02c5c8e465fa41292c6 Merge: b61976a7 756f97ed Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 16:55:40 2020 +0300 Merge branch 'master' into feature/2124 commit b61976a7f811e1d01327cad8b0925bd110c6e135 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 16:52:48 2020 +0300 Rename params to blocked_services, update service name display on client commit d5b8e5f7b2c4a3d6701cf8845d31b28f55c6a808 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 15:59:46 2020 +0300 Update docs, return global blocked status commit adc9a294f76070dea2d845155814c21c52fc6c7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 15:24:34 2020 +0300 + querylog: Extract filteringStatusBlockedService commit ee8c1dce0d7520be0d0fcfe6f798dd11f13c9262 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 13:54:16 2020 +0300 + client: Add blocked service filter support
2020-09-23 16:47:02 +00:00
open: true,
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
host: devServerHost,
port: devServerPort,
proxy: {
[proxyUrl]: `http://${devServerHost}:${port}`,
},
+ client: Move the client access check to the server-side Squashed commit of the following: commit 1aab0f62e94ce665a1b996552fac41dc4e769b4d Merge: cdf5eb6e c1f5fdae Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Sep 24 15:36:05 2020 +0300 Merge branch '1920-client-find' into feature/1925 commit cdf5eb6ea67a665d21a3155d8cf89bba9a5a9948 Merge: b6c20b1c 10f67bd3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 20:28:51 2020 +0300 Merge branch 'master' into feature/1925 commit b6c20b1c7359a0e5902405b0551712f936848a80 Merge: 97d388ef 96512433 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 15 10:44:25 2020 +0300 Merge branch 'master' into feature/1925 commit 97d388ef6571d590f21da00f86d889e881ca0c3d Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 15 10:30:50 2020 +0300 Extract buttons commit ca45fde11fc2b2812ff2b84dbd67aff0b5341be1 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Sep 10 12:46:09 2020 +0300 Handle errors in updateLogs commit f15e03c2e5a7115db984f70f72b0ddd870ece73d Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Sep 10 12:39:34 2020 +0300 Update mobile block status on click commit 033b28db3b324f6d529ac1a0ef657886cdbe02bd Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 9 20:53:42 2020 +0300 Fix mobile block buttons, auto open page on web serve start commit 2730937b23309167a066b9154728ac53ffe81a49 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 9 13:58:37 2020 +0300 Disable allow this client button when isNotInAllowedList is true commit 818cf869d63654c184762ad2701c4429a3e3011e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 9 13:06:01 2020 +0300 Update client block state on option click commit a072b8983757f419645c0207ea78e6e867c440cb Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 8 20:17:16 2020 +0300 Adapt to api changes commit 28ab2bd8b3f14f60bc822b5a69fa1801db67d816 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 8 14:12:20 2020 +0300 Change query log block confirm messages commit 9b0b6f6f9b1ec168fa71dbedd036152da59006e3 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 8 12:00:46 2020 +0300 Refactor inner work with disallowed commit 05f76154b8f489738d032fdaa835edb371ce70c7 Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 16:11:37 2020 +0300 + client: Move the client access check to the server-side
2020-09-24 12:48:37 +00:00
open: true,
Pull request #730: + client: Add Hot Module Replacement Merge in DNS/adguard-home from feature/hmr to master Squashed commit of the following: commit 952ed1955c2a7a32446d99489f137f02eb47c99e Merge: 83484931 de92c852 Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu Aug 13 11:02:10 2020 +0300 Merge branch 'master' into feature/hmr commit 8348493105d7d63d8b0836a5c272df2b17a6b142 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 15:07:31 2020 +0300 Remove empty prop types, remove Services empty container commit b2fe4a30b79d91e482318ee5deea8e49c7038f7e Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:56:35 2020 +0300 Move constants commit f8be4c18c35193ad77bf5e25f311ad834c1d6870 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 13:19:02 2020 +0300 Fix Setup bug, update webpack.dev commit 1d9cc4ddf8af2c979eb707a7f0fc06744eec186c Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 12:10:38 2020 +0300 Review changes commit a1edb21358def21ed1808b081ffc2f0b6755e3da Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Aug 5 11:46:58 2020 +0300 Remove lazy loading, fix updated components commit 0aa2cf55f8d4206ac9e2f99fc1b990ed8a9c7825 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 20:32:19 2020 +0300 Refactor App component, add lazy loading commit 3c2ba4772a91ff7b06641dba6c6bf3fdcd2fdf7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 17:12:41 2020 +0300 Simplify App hot loading boilerplate, setup lazy loading, update Header commit 8df3221f315372b066f2ac0c9a1687f1677b8415 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Aug 4 15:16:06 2020 +0300 + client: Add Hot Module Replacement
2020-08-13 08:15:45 +00:00
};
};
2018-08-30 14:25:33 +00:00
module.exports = merge(common, {
2019-07-22 12:32:12 +00:00
devtool: 'eval-source-map',
2018-08-30 14:25:33 +00:00
module: {
2019-07-22 12:32:12 +00:00
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
emitWarning: true,
configFile: 'dev.eslintrc',
},
2018-08-30 14:25:33 +00:00
},
2019-07-22 12:32:12 +00:00
],
2018-08-30 14:25:33 +00:00
},
+ client, querylog: Add blocked service filter support Close #2124 Squashed commit of the following: commit 574726e88e4fe7df745dfc964706e1e26f8da59f Merge: 3bc770fb dc61744d Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 19:32:38 2020 +0300 Merge branch 'master' into feature/2124 commit 3bc770fba6d06bbd965ee181aed7b0a050175f58 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 11:22:07 2020 +0300 minor commit 90c0d739d1bd09dbcf5f27ff9e6c3f761bf81686 Merge: 5d1f2642 1d36abd1 Author: ArtemBaskal <a.baskal@adguard.com> Date: Wed Sep 23 11:17:24 2020 +0300 Merge branch 'master' into feature/2124 commit 5d1f264212686ac7ecab30401b4f0e3c020dbee9 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 17:23:08 2020 +0300 Display elapsed if there is no service_name in blocked service commit af86cedc31d566238764e02c5c8e465fa41292c6 Merge: b61976a7 756f97ed Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 16:55:40 2020 +0300 Merge branch 'master' into feature/2124 commit b61976a7f811e1d01327cad8b0925bd110c6e135 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 16:52:48 2020 +0300 Rename params to blocked_services, update service name display on client commit d5b8e5f7b2c4a3d6701cf8845d31b28f55c6a808 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 15:59:46 2020 +0300 Update docs, return global blocked status commit adc9a294f76070dea2d845155814c21c52fc6c7f Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 15:24:34 2020 +0300 + querylog: Extract filteringStatusBlockedService commit ee8c1dce0d7520be0d0fcfe6f798dd11f13c9262 Author: ArtemBaskal <a.baskal@adguard.com> Date: Tue Sep 22 13:54:16 2020 +0300 + client: Add blocked service filter support
2020-09-23 16:47:02 +00:00
...(process.env.WEBPACK_DEV_SERVER ? { devServer: getDevServerConfig(BASE_URL) } : undefined),
2018-08-30 14:25:33 +00:00
});