Merge tag 'dspace-7.4' into fully-qualified-sitemap-urls-7.4

This commit is contained in:
Art Lowel
2023-01-11 17:39:22 +01:00
1609 changed files with 96023 additions and 40657 deletions

View File

@@ -2,8 +2,7 @@ import { globalCSSImports, projectRoot } from './helpers';
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtPlugin = require('script-ext-html-webpack-plugin');
const sass = require('sass');
export const copyWebpackOptions = {
patterns: [
@@ -20,11 +19,10 @@ export const copyWebpackOptions = {
// replace(/\\/g, '/') because glob patterns need forward slashes, even on windows:
// https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
from: path.join(__dirname, '..', 'src', 'themes', '*', 'assets', '**', '*').replace(/\\/g, '/'),
to: 'assets',
noErrorOnMissing: true,
transformPath(targetPath, absolutePath) {
to({ absoluteFilename }) {
// use [\/|\\] to match both POSIX and Windows separators
const matches = absolutePath.match(/.*[\/|\\]themes[\/|\\]([^\/|^\\]+)[\/|\\]assets[\/|\\](.+)$/);
const matches = absoluteFilename.match(/.*[\/|\\]themes[\/|\\]([^\/|^\\]+)[\/|\\]assets[\/|\\](.+)$/);
if (matches) {
// matches[1] is the theme name
// matches[2] is the rest of the path relative to the assets folder
@@ -40,16 +38,21 @@ export const copyWebpackOptions = {
]
};
const SCSS_LOADERS = [{
loader: 'postcss-loader',
options: {
sourceMap: true
}
},
const SCSS_LOADERS = [
{
loader: 'postcss-loader',
options: {
sourceMap: true
}
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
// sass >1.33 complains about deprecation warnings in Bootstrap 4
// After upgrading to Angular 12 we need to explicitly use an older version here
// todo: remove after upgrading to Bootstrap 5
implementation: sass,
sassOptions: {
includePaths: [projectRoot('./')]
}
@@ -60,14 +63,6 @@ const SCSS_LOADERS = [{
export const commonExports = {
plugins: [
new CopyWebpackPlugin(copyWebpackOptions),
new HtmlWebpackPlugin({
template: projectRoot('./src/index.html', ),
output: projectRoot('dist'),
inject: 'head'
}),
new ScriptExtPlugin({
defaultAttribute: 'defer'
})
],
module: {
rules: [
@@ -99,5 +94,8 @@ export const commonExports = {
]
},
],
}
},
ignoreWarnings: [
/src\/themes\/[^/]+\/.*theme.module.ts is part of the TypeScript compilation but it's unused/,
]
};