From 68ca8b0976efe90c0c40bcae69f0825671b98bad Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 30 May 2020 16:23:25 +0800 Subject: Merge front end to this repo. But I need to wait for aspnet core support for custom port and package manager for dev server. --- Timeline/ClientApp/webpack.common.ts | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Timeline/ClientApp/webpack.common.ts (limited to 'Timeline/ClientApp/webpack.common.ts') diff --git a/Timeline/ClientApp/webpack.common.ts b/Timeline/ClientApp/webpack.common.ts new file mode 100644 index 00000000..9e7da028 --- /dev/null +++ b/Timeline/ClientApp/webpack.common.ts @@ -0,0 +1,59 @@ +import webpack from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import autoprefixer from 'autoprefixer'; + +export const commonRules: webpack.RuleSetRule[] = [ + { + test: /\.css$/, + use: ['style-loader', 'css-loader'] + }, + { + test: /\.(scss)$/, + use: [ + 'style-loader', + 'css-loader', + { + loader: 'postcss-loader', + options: { + plugins: function() { + return [autoprefixer]; + } + } + }, + 'sass-loader' + ] + }, + { + test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot)$/i, + use: [ + { + loader: 'url-loader', + options: { + limit: 8192 + } + }, + { + loader: 'image-webpack-loader' + } + ] + } +]; + +export const htmlCommonConfig: HtmlWebpackPlugin.Options = { + inject: false, + template: require('html-webpack-template'), + + appMountId: 'app', + mobile: true, + + headHtmlSnippet: ` + + + + + + + + `, + title: 'Timeline' +}; -- cgit v1.2.3