diff options
author | crupest <crupest@outlook.com> | 2020-06-01 22:48:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-01 22:48:25 +0800 |
commit | 6e0b89c28a71c0b3c6ebb959f5fa7e18a464bd2d (patch) | |
tree | 6d6c4fc1555418df52cc906a460725637958c85a /Timeline/ClientApp/webpack.common.ts | |
parent | 738d36fa225bca5fb954ae705051226bef75d569 (diff) | |
download | timeline-6e0b89c28a71c0b3c6ebb959f5fa7e18a464bd2d.tar.gz timeline-6e0b89c28a71c0b3c6ebb959f5fa7e18a464bd2d.tar.bz2 timeline-6e0b89c28a71c0b3c6ebb959f5fa7e18a464bd2d.zip |
Migrate to yarn v2 .
Diffstat (limited to 'Timeline/ClientApp/webpack.common.ts')
-rw-r--r-- | Timeline/ClientApp/webpack.common.ts | 28 |
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',
};
|