diff options
author | silverwind <me@silverwind.io> | 2023-03-15 03:20:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 22:20:19 -0400 |
commit | 202803fc69d21763a06d8d0f5a4c46509c18f6f1 (patch) | |
tree | 4e273829061a640ceb6b3a33e563b3e8d842a8ae /webpack.config.js | |
parent | bf730528cadc4727eab8844934b6a0716d327243 (diff) | |
download | gitea-202803fc69d21763a06d8d0f5a4c46509c18f6f1.tar.gz gitea-202803fc69d21763a06d8d0f5a4c46509c18f6f1.zip |
Replace Less with CSS (#23481)
Ran most of the Less files through the Less compiler and Prettier and
then followed up with a round of manual fixes.
The Less compiler had unfortunately stripped all `//` style comments
that I had to restore (It did preserve `/* */` comments). Other fixes
include duplicate selector removal which were revealed after the
transpilation and which weren't caught by stylelint before but now are.
Fixes: https://github.com/go-gitea/gitea/issues/15565
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/webpack.config.js b/webpack.config.js index 46bdd6acfa..ec8a195940 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -21,7 +21,7 @@ const glob = (pattern) => fastGlob.sync(pattern, { }); const themes = {}; -for (const path of glob('web_src/less/themes/*.less')) { +for (const path of glob('web_src/css/themes/*.css')) { themes[parse(path).name] = [path]; } @@ -57,14 +57,14 @@ export default { fileURLToPath(new URL('web_src/js/index.js', import.meta.url)), fileURLToPath(new URL('node_modules/easymde/dist/easymde.min.css', import.meta.url)), fileURLToPath(new URL('web_src/fomantic/build/semantic.css', import.meta.url)), - fileURLToPath(new URL('web_src/less/index.less', import.meta.url)), + fileURLToPath(new URL('web_src/css/index.css', import.meta.url)), ], webcomponents: [ fileURLToPath(new URL('web_src/js/webcomponents/GiteaOriginUrl.js', import.meta.url)), ], swagger: [ fileURLToPath(new URL('web_src/js/standalone/swagger.js', import.meta.url)), - fileURLToPath(new URL('web_src/less/standalone/swagger.less', import.meta.url)), + fileURLToPath(new URL('web_src/css/standalone/swagger.css', import.meta.url)), ], serviceworker: [ fileURLToPath(new URL('web_src/js/serviceworker.js', import.meta.url)), @@ -136,7 +136,7 @@ export default { ], }, { - test: /.css$/i, + test: /\.css$/i, use: [ { loader: MiniCssExtractPlugin.loader, @@ -152,29 +152,6 @@ export default { ], }, { - test: /.less$/i, - use: [ - { - loader: MiniCssExtractPlugin.loader, - }, - { - loader: 'css-loader', - options: { - sourceMap: true, - importLoaders: 1, - url: {filter: filterCssImport}, - import: {filter: filterCssImport}, - }, - }, - { - loader: 'less-loader', - options: { - sourceMap: true, - }, - }, - ], - }, - { test: /\.svg$/, include: fileURLToPath(new URL('public/img/svg', import.meta.url)), type: 'asset/source', |