fix: 修复win下copy的bug

This commit is contained in:
wanchun 2021-03-06 22:44:39 +08:00
parent 37c6464be1
commit aab4e814a9
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,8 @@
import { join, resolve } from 'path';
import { existsSync } from 'fs';
import {
winPath,
} from '@umijs/utils';
import resolveDefine from './resolveDefine';
export default async function createHtmlWebpackConfig({
@ -41,7 +44,7 @@ export default async function createHtmlWebpackConfig({
? htmlPath
: defaultHtmlPath;
publicCopyIgnore.push(htmlOptions.template);
publicCopyIgnore.push(winPath(htmlOptions.template));
webpackConfig
.plugin('html')
.use(require.resolve('html-webpack-plugin'), [htmlOptions]);

View File

@ -10,7 +10,6 @@ export default (api) => {
const files = [
'global.css',
'global.less',
'global.stylus'
];
const globalCSSFile = files
.map(file => join(absSrcPath || '', file))