aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/webpack.common.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-01 22:48:25 +0800
committercrupest <crupest@outlook.com>2020-06-01 22:48:25 +0800
commit6c6d83baeba7289ffeff6c5ec1d90a8d411d2989 (patch)
treea66bb3c077ad683e8b395a2ce56eae7f55a96fa0 /Timeline/ClientApp/webpack.common.ts
parentf0e7b9ac7a676ed4bbe372dbbe39f2391ea61079 (diff)
downloadtimeline-6c6d83baeba7289ffeff6c5ec1d90a8d411d2989.tar.gz
timeline-6c6d83baeba7289ffeff6c5ec1d90a8d411d2989.tar.bz2
timeline-6c6d83baeba7289ffeff6c5ec1d90a8d411d2989.zip
Migrate to yarn v2 .
Diffstat (limited to 'Timeline/ClientApp/webpack.common.ts')
-rw-r--r--Timeline/ClientApp/webpack.common.ts28
1 files changed, 13 insertions, 15 deletions
diff --git a/Timeline/ClientApp/webpack.common.ts b/Timeline/ClientApp/webpack.common.ts
index 9e7da028..c4e95e54 100644
--- a/Timeline/ClientApp/webpack.common.ts
+++ b/Timeline/ClientApp/webpack.common.ts
@@ -1,11 +1,12 @@
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import autoprefixer from 'autoprefixer';
+import htmlWebpackTemplate from 'html-webpack-template';
export const commonRules: webpack.RuleSetRule[] = [
{
test: /\.css$/,
- use: ['style-loader', 'css-loader']
+ use: ['style-loader', 'css-loader'],
},
{
test: /\.(scss)$/,
@@ -15,13 +16,13 @@ export const commonRules: webpack.RuleSetRule[] = [
{
loader: 'postcss-loader',
options: {
- plugins: function() {
+ plugins: function () {
return [autoprefixer];
- }
- }
+ },
+ },
},
- 'sass-loader'
- ]
+ 'sass-loader',
+ ],
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot)$/i,
@@ -29,19 +30,16 @@ export const commonRules: webpack.RuleSetRule[] = [
{
loader: 'url-loader',
options: {
- limit: 8192
- }
+ limit: 8192,
+ },
},
- {
- loader: 'image-webpack-loader'
- }
- ]
- }
+ ],
+ },
];
export const htmlCommonConfig: HtmlWebpackPlugin.Options = {
inject: false,
- template: require('html-webpack-template'),
+ template: htmlWebpackTemplate,
appMountId: 'app',
mobile: true,
@@ -55,5 +53,5 @@ export const htmlCommonConfig: HtmlWebpackPlugin.Options = {
<meta name="msapplication-TileColor" content="#2d89ef">
<meta name="theme-color" content="#ffffff">
`,
- title: 'Timeline'
+ title: 'Timeline',
};