aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/webpack.common.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-05-30 23:41:31 +0800
committerGitHub <noreply@github.com>2020-05-30 23:41:31 +0800
commitc8d71a3b5e7aef4fcf75bad44b7be90b45aaaf0b (patch)
treef76ecd77c99c4136d1ab4771b91a92f1e5ad4a35 /Timeline/ClientApp/webpack.common.ts
parent7e393559d2883a37b1be0c82cccc06bc97c3d102 (diff)
parent83de798e74323e96e81b8196b04e23ed2bd4efbf (diff)
downloadtimeline-c8d71a3b5e7aef4fcf75bad44b7be90b45aaaf0b.tar.gz
timeline-c8d71a3b5e7aef4fcf75bad44b7be90b45aaaf0b.tar.bz2
timeline-c8d71a3b5e7aef4fcf75bad44b7be90b45aaaf0b.zip
Merge pull request #72 from crupest/merge-frontend
Merge frontend repo into this repo.
Diffstat (limited to 'Timeline/ClientApp/webpack.common.ts')
-rw-r--r--Timeline/ClientApp/webpack.common.ts59
1 files changed, 59 insertions, 0 deletions
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: `
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+ <link rel="manifest" href="/site.webmanifest">
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
+ <meta name="msapplication-TileColor" content="#2d89ef">
+ <meta name="theme-color" content="#ffffff">
+ `,
+ title: 'Timeline'
+};