mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-05 23:42:54 +03:00
Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <v.abdulmyanov@adguard.com>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed
This commit is contained in:
parent
aef4659e93
commit
5e20ac7ed5
200 changed files with 20843 additions and 55 deletions
client2/scripts/webpack
74
client2/scripts/webpack/webpack.config.base.js
Normal file
74
client2/scripts/webpack/webpack.config.base.js
Normal file
|
@ -0,0 +1,74 @@
|
|||
const path = require('path');
|
||||
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const tsconfig = require('../../tsconfig.json');
|
||||
|
||||
const RESOURCES_PATH = path.resolve(__dirname, '../../');
|
||||
const HTML_PATH = path.resolve(RESOURCES_PATH, 'public/index.html');
|
||||
const HTML_INSTALL_PATH = path.resolve(RESOURCES_PATH, 'public/install.html');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
install: './src/Install.tsx',
|
||||
main: './src/App.tsx'
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js', '.pcss'],
|
||||
alias: Object.keys(tsconfig.compilerOptions.paths).reduce((aliases, key) => {
|
||||
// Reduce to load aliases from ./tsconfig.json in appropriate for webpack form
|
||||
const paths = tsconfig.compilerOptions.paths[key].map(p => p.replace('/*', ''));
|
||||
aliases[key.replace('/*', '')] = path.resolve(
|
||||
__dirname,
|
||||
'../../',
|
||||
tsconfig.compilerOptions.baseUrl,
|
||||
...paths,
|
||||
);
|
||||
return aliases;
|
||||
}, {}),
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
{
|
||||
test: /\.(woff|woff2)$/,
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
options:{
|
||||
outputPath:'./',
|
||||
}
|
||||
}],
|
||||
},
|
||||
{
|
||||
test:/\.(png|jpe?g|gif)$/,
|
||||
exclude: /(node_modules)/,
|
||||
use:[{
|
||||
loader:'file-loader',
|
||||
options:{
|
||||
outputPath:'./images',
|
||||
}
|
||||
}]
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
// new AntdDayjsWebpackPlugin()
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
cache: false,
|
||||
chunks: ['main'],
|
||||
template: HTML_PATH,
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
cache: false,
|
||||
chunks: ['install'],
|
||||
filename: 'install.html',
|
||||
template: HTML_INSTALL_PATH,
|
||||
}),
|
||||
],
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue