mirror of
https://github.com/Screenly/Anthias.git
synced 2026-02-20 07:54:27 -05:00
* refactor(sass): migrate from @import to @use and silence Bootstrap warnings - Convert custom Sass files to modern @use syntax - Move theme color variables to _variables.scss for proper Bootstrap customization - Reorganize _bootstrap.scss to ensure correct variable scoping - Configure webpack sass-loader to silence Bootstrap deprecation warnings Bootstrap's internal deprecation warnings are silenced via silenceDeprecations option in webpack config. These warnings will be addressed by the Bootstrap team in future versions. * chore: revert changes to SCSS files
66 lines
1.5 KiB
JavaScript
66 lines
1.5 KiB
JavaScript
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const path = require("path");
|
|
const webpack = require('webpack');
|
|
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: {
|
|
"anthias": "./static/src/index.tsx",
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, "static/dist"),
|
|
filename: "js/[name].js",
|
|
clean: true,
|
|
},
|
|
plugins: [
|
|
new MiniCssExtractPlugin({
|
|
filename: "css/anthias.css"
|
|
}),
|
|
new webpack.ProvidePlugin({
|
|
React: 'react'
|
|
}),
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: [/node_modules/, /src\/test/],
|
|
},
|
|
{
|
|
test: /\.(js|jsx|mjs)$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: [
|
|
'@babel/preset-env',
|
|
'@babel/preset-react',
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
"css-loader",
|
|
{
|
|
loader: "sass-loader",
|
|
options: {
|
|
sassOptions: {
|
|
quietDeps: true,
|
|
silenceDeprecations: ['import', 'global-builtin', 'color-functions', 'if-function']
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
plugins: [new TsconfigPathsPlugin()],
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
|
}
|
|
};
|