diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-05-01 19:34:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-01 19:34:25 +0200 |
| commit | 2ee4175437bbfcddf98e5eacba9b019113716ac8 (patch) | |
| tree | aff6c7c9adfc27f0f33ab4e14edcf17829dbb282 /electron/service/config/css.js | |
| parent | eb64c88a8bf9c8fe66c33a5309d28e526b994d25 (diff) | |
Remove electron entirely (#2859)
Co-authored-by: rejbasket
Diffstat (limited to 'electron/service/config/css.js')
| -rw-r--r-- | electron/service/config/css.js | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/electron/service/config/css.js b/electron/service/config/css.js deleted file mode 100644 index 3fb5893e..00000000 --- a/electron/service/config/css.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict' - -const MiniCssExtractPlugin = require('mini-css-extract-plugin') - -const isProd = process.env.NODE_ENV === 'production' - -const plugins = [] -if (isProd) { - const filename = 'css/[name].[contenthash:8].css' - - plugins.push( - new MiniCssExtractPlugin({ - filename, - chunkFilename: filename, - }) - ) -} - -const genStyleRules = () => { - const cssLoader = { - loader: 'css-loader', - options: { - // how many loaders before css-loader should be applied to [@import]ed resources. - // stylePostLoader injected by vue-loader + postcss-loader - importLoaders: 1 + 1, - esModule: false, // css-loader using ES Modules as default in v4, but vue-style-loader support cjs only. - }, - } - const postcssLoader = { - loader: 'postcss-loader', - options: { - postcssOptions: { - plugins: [require('autoprefixer')] - }, - }, - } - const extractPluginLoader = { - loader: MiniCssExtractPlugin.loader, - } - const vueStyleLoader = { - loader: 'vue-style-loader', - } - - function createCSSRule(test, loader, loaderOptions) { - const loaders = [cssLoader, postcssLoader] - - if (isProd) { - loaders.unshift(extractPluginLoader) - } else { - loaders.unshift(vueStyleLoader) - } - - if (loader) { - loaders.push({ loader, options: loaderOptions }) - } - - return { test, use: loaders } - } - - return [ - createCSSRule(/\.css$/), - createCSSRule(/\.p(ost)?css$/), - createCSSRule(/\.scss$/, 'sass-loader') - ] -} - -module.exports = { - plugins, - module: { - rules: genStyleRules(), - }, -} |
