mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
87968: Fix missing theme assets
Adapt to changes in https://github.com/webpack-contrib/copy-webpack-plugin
This commit is contained in:
@@ -19,11 +19,10 @@ export const copyWebpackOptions = {
|
|||||||
// replace(/\\/g, '/') because glob patterns need forward slashes, even on windows:
|
// replace(/\\/g, '/') because glob patterns need forward slashes, even on windows:
|
||||||
// https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
|
// https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
|
||||||
from: path.join(__dirname, '..', 'src', 'themes', '*', 'assets', '**', '*').replace(/\\/g, '/'),
|
from: path.join(__dirname, '..', 'src', 'themes', '*', 'assets', '**', '*').replace(/\\/g, '/'),
|
||||||
to: 'assets',
|
|
||||||
noErrorOnMissing: true,
|
noErrorOnMissing: true,
|
||||||
transformPath(targetPath, absolutePath) {
|
to({ absoluteFilename }) {
|
||||||
// use [\/|\\] to match both POSIX and Windows separators
|
// use [\/|\\] to match both POSIX and Windows separators
|
||||||
const matches = absolutePath.match(/.*[\/|\\]themes[\/|\\]([^\/|^\\]+)[\/|\\]assets[\/|\\](.+)$/);
|
const matches = absoluteFilename.match(/.*[\/|\\]themes[\/|\\]([^\/|^\\]+)[\/|\\]assets[\/|\\](.+)$/);
|
||||||
if (matches) {
|
if (matches) {
|
||||||
// matches[1] is the theme name
|
// matches[1] is the theme name
|
||||||
// matches[2] is the rest of the path relative to the assets folder
|
// matches[2] is the rest of the path relative to the assets folder
|
||||||
|
Reference in New Issue
Block a user