From 6c4278b4d6c39bd825fc4231cfc99d4d72440bc5 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Thu, 16 Apr 2020 18:04:19 +0000 Subject: [PATCH] Upload New File --- .../webpack.config.js | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 arch-config/usr/share/lightdm-webkit/themes/lightdm-webkit-theme-aether/webpack.config.js diff --git a/arch-config/usr/share/lightdm-webkit/themes/lightdm-webkit-theme-aether/webpack.config.js b/arch-config/usr/share/lightdm-webkit/themes/lightdm-webkit-theme-aether/webpack.config.js new file mode 100644 index 00000000..6ff6deba --- /dev/null +++ b/arch-config/usr/share/lightdm-webkit/themes/lightdm-webkit-theme-aether/webpack.config.js @@ -0,0 +1,72 @@ +var path = require("path"); +var webpack = require("webpack"); + + +module.exports = function(env) { + env.NODE_ENV = (env.production) ? 'production' : 'development'; + process.env.NODE_ENV = env.NODE_ENV; + + const isProduction = (env.NODE_ENV === 'production'); + + return { + "entry": "./src/js/Main.jsx", + "mode": env.NODE_ENV, + "output": { + "path": path.resolve("./dist/js"), + "filename": "Aether.js" + }, + "module": { + "rules": [ + { + "test": /\.(js|jsx)$/, + "use": [ + "babel-loader", + "eslint-loader" + ] + }, + { + "test": /\.(scss|sass)$/, + "use": [ + { + "loader": "style-loader" + }, + { + "loader": "css-loader", + "options": { + "url": false, + "sourceMap": !isProduction, + "minimize": isProduction + } + }, + { + "loader": "sass-loader", + "options": { + "sourceMap": !isProduction + } + } + ] + }, + { + "test": /\.svg$/, + "use": [{ + "loader": "svg-inline-loader", + "options": { + "removeTags": true + } + }] + } + ] + }, + "devtool": (isProduction) ? 'source-map' : 'eval-source-map', + "plugins": [ + new webpack.DefinePlugin({ + "process.env.NODE_ENV": JSON.stringify(env.NODE_ENV) + }) + ], + "resolve": { + "extensions": [ ".js", ".min.js", ".jsx" ], + "mainFiles": [ 'index', 'Main' ], + "modules": [ "./dist/js", "./node_modules", "./src", "./src/js" ] + } + }; +};