aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..9bc34f8
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,44 @@
+const path = require("path")
+const MiniCssExtractPlugin = require("mini-css-extract-plugin")
+const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts")
+
+module.exports = {
+ mode: process.env.NODE_ENV,
+ entry: {
+ tau: "./resources/src/css/tau.scss"
+ },
+ output: {
+ path: path.resolve(__dirname, "resources/public")
+ },
+ plugins: [
+ new RemoveEmptyScriptsPlugin(),
+ new MiniCssExtractPlugin({
+ filename: "css/[name].css",
+ })
+ ],
+ module: {
+ rules: [
+ {
+ test: /\.scss$/i,
+ use: [
+ MiniCssExtractPlugin.loader,
+ {
+ loader: 'css-loader',
+ options: {
+ importLoaders: 1
+ }
+ },
+ "postcss-loader",
+ "sass-loader"
+ ]
+ },
+ {
+ test: /\.(woff|woff2|eot|ttf|otf)$/i,
+ type: 'asset/resource',
+ generator: {
+ filename: 'fonts/[hash][ext][query]'
+ }
+ }
+ ]
+ }
+}