mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
fix: read __CSS_PARSER__ from config (#9290)
* fix: read __CSS_PARSER__ from config * fix: missing import and default value * imports order
This commit is contained in:
@ -14,6 +14,7 @@ import { WatchStatePlugin } from '../plugins/WatchStatePlugin';
|
|||||||
import { hasDependency } from '../helpers/dependencies';
|
import { hasDependency } from '../helpers/dependencies';
|
||||||
import { applyDotEnvPlugin } from '../helpers/dotEnv';
|
import { applyDotEnvPlugin } from '../helpers/dotEnv';
|
||||||
import { env as _env, IWebpackEnv } from '../index';
|
import { env as _env, IWebpackEnv } from '../index';
|
||||||
|
import { getValue } from '../helpers/config';
|
||||||
import { getIPS } from '../helpers/host';
|
import { getIPS } from '../helpers/host';
|
||||||
import {
|
import {
|
||||||
getPlatformName,
|
getPlatformName,
|
||||||
@ -294,7 +295,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
|||||||
__NS_ENV_VERBOSE__: !!env.verbose,
|
__NS_ENV_VERBOSE__: !!env.verbose,
|
||||||
__NS_DEV_HOST_IPS__:
|
__NS_DEV_HOST_IPS__:
|
||||||
mode === 'development' ? JSON.stringify(getIPS()) : `[]`,
|
mode === 'development' ? JSON.stringify(getIPS()) : `[]`,
|
||||||
__CSS_PARSER__: JSON.stringify('css-tree'), // todo: replace from config value
|
__CSS_PARSER__: JSON.stringify(getValue('cssParser', 'css-tree')),
|
||||||
__ANDROID__: platform === 'android',
|
__ANDROID__: platform === 'android',
|
||||||
__IOS__: platform === 'ios',
|
__IOS__: platform === 'ios',
|
||||||
/* for compat only */ 'global.isAndroid': platform === 'android',
|
/* for compat only */ 'global.isAndroid': platform === 'android',
|
||||||
|
Reference in New Issue
Block a user