mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
feat(wepback): custom buildPath
support (#10477)
Co-authored-by: farfromrefuge <dev@akylas.fr>
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import { basename, relative, resolve } from 'path';
|
||||
import Config from 'webpack-chain';
|
||||
import { sync as globbySync } from 'globby';
|
||||
import { basename } from 'path';
|
||||
|
||||
import { getProjectRootPath } from './project';
|
||||
import { getEntryDirPath } from './platform';
|
||||
import { env } from '..';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { resolve } from 'path';
|
||||
|
||||
import { env as _env, IWebpackEnv } from '../index';
|
||||
import { addCopyRule } from './copyRules';
|
||||
import { getProjectRootPath } from './project';
|
||||
import { addCopyRule } from './copyRules';
|
||||
|
||||
interface IReplacementMap {
|
||||
[_replace: string]: /* _with */ string;
|
||||
|
@ -10,6 +10,7 @@ import { applyFileReplacements } from './fileReplacements';
|
||||
import { addCopyRule, removeCopyRule } from './copyRules';
|
||||
import { error, info, warn, warnOnce } from './log';
|
||||
import { determineProjectFlavor } from './flavor';
|
||||
import { readTsConfig } from './typescript';
|
||||
import { getValue } from './config';
|
||||
import { getIPS } from './host';
|
||||
import {
|
||||
@ -26,7 +27,6 @@ import {
|
||||
getPlatform,
|
||||
getPlatformName,
|
||||
} from './platform';
|
||||
import { readTsConfig } from './typescript';
|
||||
|
||||
// intentionally populated manually
|
||||
// as this generates nicer typings
|
||||
|
@ -1,5 +1,5 @@
|
||||
import dedent from 'ts-dedent';
|
||||
import { env } from '@nativescript/webpack';
|
||||
import dedent from 'ts-dedent';
|
||||
|
||||
// de-indents strings so multi-line string literals can be used
|
||||
function cleanup(data: any[]) {
|
||||
|
@ -138,7 +138,7 @@ export function getDistPath() {
|
||||
}
|
||||
|
||||
// fallback to a generic platforms/<platform>/dist folder
|
||||
return `platforms/${getPlatformName()}/dist`;
|
||||
return `${env.buildPath ?? 'platforms'}/${getPlatformName()}/dist`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { ContextExclusionPlugin } from 'webpack';
|
||||
import Config from 'webpack-chain';
|
||||
import { dirname, join } from 'path';
|
||||
import { writeFileSync, mkdirSync } from 'fs';
|
||||
|
||||
import VirtualModulesPlugin from 'webpack-virtual-modules';
|
||||
import { getEntryDirPath } from './platform';
|
||||
import { ContextExclusionPlugin } from 'webpack';
|
||||
import { mkdirSync, writeFileSync } from 'fs';
|
||||
import { dirname, join } from 'path';
|
||||
import Config from 'webpack-chain';
|
||||
import dedent from 'ts-dedent';
|
||||
|
||||
import { getEntryDirPath } from './platform';
|
||||
import { getProjectFilePath } from './project';
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user