1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
From: Colin Watson <cjwatson@debian.org>
Date: Wed, 20 Nov 2024 08:49:25 +0100
Subject: Avoid unpackaged webpack dependencies
Forwarded: not-needed
Last-Update: 2024-11-24
---
src/sphinx_book_theme/assets/scripts/index.js | 2 +-
webpack.config.js | 11 +----------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/sphinx_book_theme/assets/scripts/index.js b/src/sphinx_book_theme/assets/scripts/index.js
index 372e263..570716c 100644
--- a/src/sphinx_book_theme/assets/scripts/index.js
+++ b/src/sphinx_book_theme/assets/scripts/index.js
@@ -1,6 +1,6 @@
// Import CSS variables
// ref: https://css-tricks.com/getting-javascript-to-talk-to-css-and-sass/
-import "../styles/index.scss";
+import "../styles/css/index.css";
/**
* A helper function to load scripts when the DOM is loaded.
diff --git a/webpack.config.js b/webpack.config.js
index 840515b..84dfadb 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,7 +1,6 @@
// Webpack configuration for sphinx-book-theme
const { resolve } = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
-const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); // Compile our translation files
const { exec } = require("child_process");
exec("python src/sphinx_book_theme/_compile_translations.py");
@@ -21,11 +20,10 @@ module.exports = {
filename: "scripts/[name].js",
path: staticPath,
},
- optimization: { minimizer: ["...", new CssMinimizerPlugin()] },
module: {
rules: [
{
- test: /\.scss$/,
+ test: /\.css$/,
use: [
{ loader: MiniCssExtractPlugin.loader },
// Interprets `@import` and `url()` like `import/require()` and will resolve them
@@ -35,13 +33,6 @@ module.exports = {
url: false,
},
},
- {
- // Loads a SASS/SCSS file and compiles it to CSS
- loader: "sass-loader",
- options: {
- sassOptions: { outputStyle: "expanded" },
- },
- },
],
},
],
|