diff options
Diffstat (limited to 'Timeline/ClientApp/webpack.config.prod.js')
-rw-r--r-- | Timeline/ClientApp/webpack.config.prod.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Timeline/ClientApp/webpack.config.prod.js b/Timeline/ClientApp/webpack.config.prod.js index 2115824d..3b74faf6 100644 --- a/Timeline/ClientApp/webpack.config.prod.js +++ b/Timeline/ClientApp/webpack.config.prod.js @@ -4,11 +4,12 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
+const WorkboxPlugin = require('workbox-webpack-plugin');
const { commonRules, htmlCommonConfig } = require('./webpack.common');
const config = {
- entry: ['./src/index.tsx'],
+ entry: ['./src/app/index.tsx'],
mode: 'production',
devtool: 'source-map',
module: {
@@ -50,7 +51,12 @@ const config = { plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin(htmlCommonConfig),
- new ForkTsCheckerWebpackPlugin(),
+ new ForkTsCheckerWebpackPlugin({
+ tsconfig: './src/app/tsconfig.json',
+ }),
+ new ForkTsCheckerWebpackPlugin({
+ tsconfig: './src/sw/tsconfig.json',
+ }),
new CopyPlugin({
patterns: [
{
@@ -59,6 +65,10 @@ const config = { },
],
}),
+ new WorkboxPlugin.InjectManifest({
+ swSrc: './src/sw/sw.ts',
+ maximumFileSizeToCacheInBytes: 15000000,
+ }),
],
};
|