Debian Codegraph @

debian/patches/002.no-build-css.patch

raw
1 From: Dmitry Shachnev <[email protected]>
2 Date: Fri, 24 Jan 2025 23:29:10 +0300
3 Subject: Build only JS with webpack, not CSS
4
5 Building CSS requires dart-sass, which is not packaged yet
6 (see https://bugs.debian.org/998024).
7
8 Forwarded: not-needed
9 ---
10 .../assets/scripts/pydata-sphinx-theme.js | 2 --
11 webpack.config.js | 32 +---------------------
12 2 files changed, 1 insertion(+), 33 deletions(-)
13
14 diff --git a/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js b/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js
15 index a861cfd..4b229b7 100644
16 --- a/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js
17 +++ b/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js
18 @@ -2,8 +2,6 @@
19 import { documentReady } from "./mixin";
20 import { compare, validate } from "compare-versions";
21
22 -import "../styles/pydata-sphinx-theme.scss";
23 -
24 /*******************************************************************************
25 * Theme interaction
26 */
27 diff --git a/webpack.config.js b/webpack.config.js
28 index 7040530..711e9e2 100644
29 --- a/webpack.config.js
30 +++ b/webpack.config.js
31 @@ -11,8 +11,6 @@
32
33 const { resolve } = require("path");
34 const HtmlWebpackPlugin = require("html-webpack-plugin");
35 -const MiniCssExtractPlugin = require("mini-css-extract-plugin");
36 -const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
37 const TerserPlugin = require("terser-webpack-plugin");
38 const dedent = require("dedent");
39 const { Compilation } = require("webpack");
40 @@ -121,7 +119,6 @@ var config = {
41 optimization: {
42 minimizer: [
43 '...',
44 - new CssMinimizerPlugin(),
45 new TerserPlugin({
46 terserOptions: {
47 parallel: true,
48 @@ -130,30 +127,6 @@ var config = {
49 },
50 module: {
51 rules: [{
52 - test: /\.(sa|sc|c)ss$/,
53 - use: [
54 - // Extracts CSS for each JS file that includes CSS
55 - { loader: MiniCssExtractPlugin.loader },
56 - {
57 - // Interprets `@import` and `url()` like `import/require()` and will resolve them
58 - loader: 'css-loader',
59 - options: {
60 - sourceMap: true,
61 - url: true,
62 - }
63 - },
64 - { loader: 'resolve-url-loader' },
65 - {
66 - // Loads a SASS/SCSS file and compiles it to CSS
67 - loader: "sass-loader",
68 - options: {
69 - sourceMap: true,
70 - sassOptions: { outputStyle: "expanded" }
71 - }
72 - },
73 - ],
74 - },
75 - {
76 // Font vendoring and management - will separate FA and export the font files
77 test: /\.(woff|woff2|eot|ttf|otf)$/i,
78 type: 'asset/resource',
79 @@ -164,10 +137,7 @@ var config = {
80 },
81 plugins: [
82 htmlWebpackPlugin,
83 - new MiniCssExtractPlugin({
84 - filename: "styles/[name].css",
85 - chunkFilename: "styles/[id].css",
86 - })],
87 + ],
88 experiments: {
89 topLevelAwait: true,
90 },