forked from Qiskit/qiskit_sphinx_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (31 loc) · 1.05 KB
/
webpack.config.js
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
// Inspired by Furo's webpack config: https://github.com/pradyunsg/furo/blob/main/webpack.config.js
const { resolve } = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
module.exports = {
devtool: "source-map",
entry: {
"qiskit-sphinx-theme": [
"./src/qiskit_sphinx_theme/assets/scripts/qiskit-sphinx-theme.js",
"./src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss",
],
},
output: {
filename: "scripts/[name].js",
path: resolve(__dirname, "src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/static"),
},
plugins: [new MiniCssExtractPlugin({ filename: "styles/[name].css" })],
optimization: { minimizer: [`...`, new CssMinimizerPlugin()] },
module: {
rules: [
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
{ loader: "css-loader", options: { sourceMap: true } },
{ loader: "sass-loader", options: { sourceMap: true } },
],
},
],
},
};