diff --git a/docs/index.html b/docs/index.html index c05b081..1ffc7a3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,7 +27,7 @@ - +
diff --git a/docs/index.css b/docs/main.css similarity index 100% rename from docs/index.css rename to docs/main.css diff --git a/webpack.dev.js b/webpack.dev.js index a91efec..d96ab07 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -1,27 +1,31 @@ /* global require module __dirname */ const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); +const { + CleanWebpackPlugin +} = require('clean-webpack-plugin'); module.exports = { entry: { - index: './src/js/index.js', + index: './src/js/index.js' }, mode: 'development', output: { path: `${__dirname}/docs`, filename: 'app.js', - assetModuleFilename: 'img/[hash][ext][query]', + assetModuleFilename: 'img/[hash][ext][query]' }, plugins: [ new CleanWebpackPlugin(), - new MiniCssExtractPlugin(), + new MiniCssExtractPlugin({ + filename: 'main.css' + }), new HtmlWebpackPlugin({ template: './src/index.html', inject: true, chunks: ['index'], filename: 'index.html', - favicon: "./src/favicon.png", + favicon: "./src/favicon.png" }) ], module: { @@ -31,7 +35,7 @@ module.exports = { use: { loader: 'babel-loader', options: { - presets: ['@babel/preset-env'], + presets: ['@babel/preset-env'] }, }, }, @@ -40,7 +44,7 @@ module.exports = { use: [{ loader: MiniCssExtractPlugin.loader, options: { - publicPath: "", + publicPath: "" }, }, // 'style-loader', @@ -50,7 +54,7 @@ module.exports = { }, { test: /\.(svg|jpg|png|ttf|eot|woff|woff2)$/, - type: 'asset', + type: 'asset' }, ], }, diff --git a/webpack.prod.js b/webpack.prod.js index c0818c3..e71a839 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,7 +3,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); +const { + CleanWebpackPlugin +} = require('clean-webpack-plugin'); module.exports = { entry: { @@ -26,7 +28,9 @@ module.exports = { }, plugins: [ new CleanWebpackPlugin(), - new MiniCssExtractPlugin(), + new MiniCssExtractPlugin({ + filename: 'main.css' + }), new HtmlWebpackPlugin({ template: './src/index.html', inject: true,