mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
fix: clean path should be absolute
This commit is contained in:
@ -139,7 +139,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
|
|||||||
new CleanWebpackPlugin(
|
new CleanWebpackPlugin(
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [
|
cleanOnceBeforeBuildPatterns: [
|
||||||
'platforms/android/app/src/main/assets/app/**/*'
|
'__jest__/platforms/android/app/src/main/assets/app/**/*'
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ exports[`react configuration > android > base config 1`] = `
|
|||||||
new CleanWebpackPlugin(
|
new CleanWebpackPlugin(
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [
|
cleanOnceBeforeBuildPatterns: [
|
||||||
'platforms/android/app/src/main/assets/app/**/*'
|
'__jest__/platforms/android/app/src/main/assets/app/**/*'
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
@ -482,7 +482,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
|
|||||||
new CleanWebpackPlugin(
|
new CleanWebpackPlugin(
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [
|
cleanOnceBeforeBuildPatterns: [
|
||||||
'platforms/ios/__jest__/app/**/*'
|
'__jest__/platforms/ios/__jest__/app/**/*'
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
@ -660,7 +660,7 @@ exports[`react configuration > ios > base config 1`] = `
|
|||||||
new CleanWebpackPlugin(
|
new CleanWebpackPlugin(
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [
|
cleanOnceBeforeBuildPatterns: [
|
||||||
'platforms/ios/__jest__/app/**/*'
|
'__jest__/platforms/ios/__jest__/app/**/*'
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ exports[`vue configuration for android 1`] = `
|
|||||||
new CleanWebpackPlugin(
|
new CleanWebpackPlugin(
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [
|
cleanOnceBeforeBuildPatterns: [
|
||||||
'platforms/android/app/src/main/assets/app/**/*'
|
'__jest__/platforms/android/app/src/main/assets/app/**/*'
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
@ -318,7 +318,7 @@ exports[`vue configuration for ios 1`] = `
|
|||||||
new CleanWebpackPlugin(
|
new CleanWebpackPlugin(
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [
|
cleanOnceBeforeBuildPatterns: [
|
||||||
'platforms/ios/__jest__/app/**/*'
|
'__jest__/platforms/ios/__jest__/app/**/*'
|
||||||
],
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ import TerserPlugin from 'terser-webpack-plugin';
|
|||||||
|
|
||||||
export default function (config: Config, env: IWebpackEnv): Config {
|
export default function (config: Config, env: IWebpackEnv): Config {
|
||||||
const entryPath = getEntryPath();
|
const entryPath = getEntryPath();
|
||||||
const distPath = getDistPath();
|
|
||||||
const platform = getPlatform();
|
const platform = getPlatform();
|
||||||
const packageJson = getPackageJson();
|
const packageJson = getPackageJson();
|
||||||
const mode = env.production ? 'production' : 'development';
|
const mode = env.production ? 'production' : 'development';
|
||||||
@ -144,7 +143,7 @@ export default function (config: Config, env: IWebpackEnv): Config {
|
|||||||
// items to clean
|
// items to clean
|
||||||
config.plugin('CleanWebpackPlugin').use(CleanWebpackPlugin, [
|
config.plugin('CleanWebpackPlugin').use(CleanWebpackPlugin, [
|
||||||
{
|
{
|
||||||
cleanOnceBeforeBuildPatterns: [`${distPath}/**/*`],
|
cleanOnceBeforeBuildPatterns: [`${getAbsoluteDistPath()}/**/*`],
|
||||||
verbose: true,
|
verbose: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
Reference in New Issue
Block a user