From 72394b6cdd4b54dbb8f0ac9c8c10c52c07160df6 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Wed, 20 Jan 2021 07:42:43 +1100 Subject: [PATCH] clean up --- .gitignore | 1 - dist/index.html | 9 --------- webpack.config.js | 44 ++++++++++++++++++++++---------------------- 3 files changed, 22 insertions(+), 32 deletions(-) delete mode 100644 dist/index.html diff --git a/.gitignore b/.gitignore index 251f2a3..aa3b362 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ yarn-error.log* lerna-debug.log* dist/* -!dist/index.html # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/dist/index.html b/dist/index.html deleted file mode 100644 index 113dca6..0000000 --- a/dist/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Webpack App - - - - \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index f68bf5f..2427506 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,43 +1,43 @@ -const webpack = require('webpack'); -const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); +const webpack = require("webpack"); +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const config = { - entry: ['babel-polyfill', './src/index.js'], + entry: ["babel-polyfill", "./src/index.js"], output: { - path: path.resolve(__dirname, 'dist'), - filename: '[name].[contenthash].js' + path: path.resolve(__dirname, "dist"), + filename: "[name].[contenthash].js" }, watch: true, module: { rules: [ { test: /\.js$/, - use: 'babel-loader', + use: "babel-loader", exclude: /node_modules/ }, { test: /\.css$/, use: [ - 'style-loader', + "style-loader", { - loader: 'css-loader', + loader: "css-loader", options: { importLoaders: 1 } }, - 'postcss-loader' + "postcss-loader" ] }, { test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/, use: [ { - loader: 'file-loader', + loader: "file-loader", options: { - name: '[name].[ext]', - outputPath: 'fonts/' + name: "[name].[ext]", + outputPath: "fonts/" } } ] @@ -46,24 +46,24 @@ const config = { }, plugins: [ new HtmlWebpackPlugin({ - appMountId: 'app', - filename: 'index.html', - template: 'index.html' + appMountId: "app", + filename: "index.html", + template: "index.html" }), - new MonacoWebpackPlugin(), + new MonacoWebpackPlugin() ], optimization: { - runtimeChunk: 'single', + runtimeChunk: "single", splitChunks: { cacheGroups: { vendor: { test: /[\\/]node_modules[\\/]/, - name: 'vendors', - chunks: 'all' + name: "vendors", + chunks: "all" } } } } }; -module.exports = config; \ No newline at end of file +module.exports = config;