diff options
author | crupest <crupest@outlook.com> | 2020-08-24 22:59:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-24 22:59:45 +0800 |
commit | de1d582bf2ed7062fd400459f30d463d47ef9982 (patch) | |
tree | 777e27f954c9fd7beab36aad61bb767a28d65a89 /Timeline/ClientApp/webpack.config.prod.js | |
parent | 5a8fb35c2791a921d8833beb37aa2edd5047da4c (diff) | |
download | timeline-de1d582bf2ed7062fd400459f30d463d47ef9982.tar.gz timeline-de1d582bf2ed7062fd400459f30d463d47ef9982.tar.bz2 timeline-de1d582bf2ed7062fd400459f30d463d47ef9982.zip |
...
Diffstat (limited to 'Timeline/ClientApp/webpack.config.prod.js')
-rw-r--r-- | Timeline/ClientApp/webpack.config.prod.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/Timeline/ClientApp/webpack.config.prod.js b/Timeline/ClientApp/webpack.config.prod.js index 5a83a3b8..188cb940 100644 --- a/Timeline/ClientApp/webpack.config.prod.js +++ b/Timeline/ClientApp/webpack.config.prod.js @@ -1,51 +1,51 @@ -const path = require('path');
-const { CleanWebpackPlugin } = require('clean-webpack-plugin');
-const CopyPlugin = require('copy-webpack-plugin');
-const WorkboxPlugin = require('workbox-webpack-plugin');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
+const path = require("path");
+const { CleanWebpackPlugin } = require("clean-webpack-plugin");
+const CopyPlugin = require("copy-webpack-plugin");
+const WorkboxPlugin = require("workbox-webpack-plugin");
+const MiniCssExtractPlugin = require("mini-css-extract-plugin");
-const config = require('./webpack.common');
+const config = require("./webpack.common");
-config.mode('production');
+config.mode("production");
config
- .entry('index')
- .add(path.resolve(__dirname, 'src/app/service-worker.tsx'));
+ .entry("index")
+ .add(path.resolve(__dirname, "src/app/service-worker.tsx"));
config.module
- .rule('css')
- .use('mini-css-extract')
- .before('css')
+ .rule("css")
+ .use("mini-css-extract")
+ .before("css")
.loader(MiniCssExtractPlugin.loader)
.end();
config.module
- .rule('sass')
- .use('mini-css-extract')
- .before('css')
+ .rule("sass")
+ .use("mini-css-extract")
+ .before("css")
.loader(MiniCssExtractPlugin.loader)
.end();
-config.devtool('source-map');
+config.devtool("source-map");
-config.plugin('mini-css-extract').use(MiniCssExtractPlugin);
+config.plugin("mini-css-extract").use(MiniCssExtractPlugin);
-config.plugin('clean').use(CleanWebpackPlugin);
+config.plugin("clean").use(CleanWebpackPlugin);
-config.plugin('copy').use(CopyPlugin, [
+config.plugin("copy").use(CopyPlugin, [
{
patterns: [
{
- from: path.resolve(__dirname, 'public/'),
- to: path.resolve(__dirname, 'dist/'),
+ from: path.resolve(__dirname, "public/"),
+ to: path.resolve(__dirname, "dist/"),
},
],
},
]);
-config.plugin('workbox').use(WorkboxPlugin.InjectManifest, [
+config.plugin("workbox").use(WorkboxPlugin.InjectManifest, [
{
- swSrc: path.resolve(__dirname, 'src/sw/sw.ts'),
+ swSrc: path.resolve(__dirname, "src/sw/sw.ts"),
maximumFileSizeToCacheInBytes: 15000000,
},
]);
|