From 6e0b89c28a71c0b3c6ebb959f5fa7e18a464bd2d Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 1 Jun 2020 22:48:25 +0800 Subject: Migrate to yarn v2 . --- Timeline/ClientApp/webpack.common.ts | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'Timeline/ClientApp/webpack.common.ts') 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 = { `, - title: 'Timeline' + title: 'Timeline', }; -- cgit v1.2.3