mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-26 09:21:51 +08:00
fix(@angular/cli): copy assets with special character paths
This commit is contained in:
parent
99b0f9d304
commit
b5bac36bf0
@ -121,11 +121,15 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
|
||||
asset.glob = asset.glob + '/**/*';
|
||||
}
|
||||
|
||||
// Escape the input in case it has special charaters and use to make glob absolute
|
||||
const escapedInput = asset.input
|
||||
.replace(/[\\|\*|\?|\!|\(|\)|\[|\]|\{|\}]/g, (substring) => `\\${substring}`);
|
||||
|
||||
return {
|
||||
context: asset.input,
|
||||
to: asset.output,
|
||||
from: {
|
||||
glob: asset.glob,
|
||||
glob: path.resolve(escapedInput, asset.glob),
|
||||
dot: true
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user