diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/webpack.config.js b/webpack.config.js index ba4fee9..8545ca0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,15 +1,15 @@ -const path = require("path") -const MiniCssExtractPlugin = require("mini-css-extract-plugin") -const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts") -const CopyPlugin = require("copy-webpack-plugin") +const path = require("path"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts"); +const CopyPlugin = require("copy-webpack-plugin"); module.exports = { mode: process.env.NODE_ENV, entry: { - index: path.resolve(__dirname, "resources/src/styles/index.scss") + index: path.resolve(__dirname, "resources/src/styles/index.scss"), }, output: { - path: path.resolve(__dirname, "resources/public") + path: path.resolve(__dirname, "resources/public"), }, plugins: [ new RemoveEmptyScriptsPlugin(), @@ -20,10 +20,14 @@ module.exports = { patterns: [ { from: path.resolve(__dirname, "resources/src/icons"), - to: "icons" - } - ] - }) + to: "icons", + }, + { + from: path.resolve(__dirname, "resources/src/index.html"), + to: "index.html", + }, + ], + }), ], module: { rules: [ @@ -33,22 +37,22 @@ module.exports = { use: [ MiniCssExtractPlugin.loader, { - loader: 'css-loader', + loader: "css-loader", options: { - importLoaders: 1 - } + importLoaders: 1, + }, }, "postcss-loader", - "sass-loader" - ] + "sass-loader", + ], }, { test: /\.(woff|woff2|eot|ttf|otf)$/i, - type: 'asset/resource', + type: "asset/resource", generator: { - filename: 'fonts/[hash][ext][query]' - } - } - ] - } -} + filename: "fonts/[hash][ext][query]", + }, + }, + ], + }, +}; |