mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
chore: apps webpack config
This commit is contained in:
1
apps/toolbox/.gitignore
vendored
1
apps/toolbox/.gitignore
vendored
@ -40,3 +40,4 @@ app/app.scss
|
|||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
!tools/**
|
!tools/**
|
||||||
|
!webpack.custom.config.js
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { NativeScriptConfig } from '@nativescript/core';
|
import { NativeScriptConfig } from '@nativescript/core';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
id: 'org.nativescript.ToolBox',
|
id: 'org.nativescript.ToolBox',
|
||||||
appResourcesPath: '../../tools/assets/App_Resources',
|
appResourcesPath: '../../tools/assets/App_Resources',
|
||||||
|
webpackConfigPath: 'webpack.custom.config.js',
|
||||||
android: {
|
android: {
|
||||||
v8Flags: '--expose_gc',
|
v8Flags: '--expose_gc',
|
||||||
markingMode: 'none',
|
markingMode: 'none',
|
||||||
suppressCallJSMethodExceptions: false,
|
suppressCallJSMethodExceptions: false,
|
||||||
}
|
},
|
||||||
} as NativeScriptConfig;
|
} as NativeScriptConfig;
|
||||||
|
18
apps/toolbox/webpack.custom.config.js
Normal file
18
apps/toolbox/webpack.custom.config.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
const webpack = require('webpack');
|
||||||
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
|
const webpackConfig = require('./webpack.config');
|
||||||
|
|
||||||
|
module.exports = (env) => {
|
||||||
|
env = env || {};
|
||||||
|
const baseConfig = webpackConfig(env);
|
||||||
|
|
||||||
|
baseConfig.plugins.push(new webpack.DefinePlugin({
|
||||||
|
__CI__: !!process.env.CI,
|
||||||
|
__UI_USE_XML_PARSER__: true,
|
||||||
|
__UI_USE_EXTERNAL_RENDERER__: false,
|
||||||
|
__CSS_PARSER__: JSON.stringify('css-tree')
|
||||||
|
}))
|
||||||
|
|
||||||
|
return baseConfig;
|
||||||
|
};
|
1
apps/ui/.gitignore
vendored
Normal file
1
apps/ui/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
!webpack.custom.config.js
|
@ -1,10 +1,11 @@
|
|||||||
import { NativeScriptConfig } from '@nativescript/core';
|
import { NativeScriptConfig } from '@nativescript/core';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
id: 'org.nativescript.uitestsapp',
|
id: 'org.nativescript.uitestsapp',
|
||||||
appResourcesPath: '../../tools/assets/App_Resources',
|
appResourcesPath: '../../tools/assets/App_Resources',
|
||||||
|
webpackConfigPath: 'webpack.custom.config.js',
|
||||||
android: {
|
android: {
|
||||||
v8Flags: '--expose_gc',
|
v8Flags: '--expose_gc',
|
||||||
markingMode: 'none'
|
markingMode: 'none',
|
||||||
},
|
},
|
||||||
} as NativeScriptConfig;
|
} as NativeScriptConfig;
|
||||||
|
18
apps/ui/webpack.custom.config.js
Normal file
18
apps/ui/webpack.custom.config.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
const webpack = require('webpack');
|
||||||
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
|
const webpackConfig = require('./webpack.config');
|
||||||
|
|
||||||
|
module.exports = (env) => {
|
||||||
|
env = env || {};
|
||||||
|
const baseConfig = webpackConfig(env);
|
||||||
|
|
||||||
|
baseConfig.plugins.push(new webpack.DefinePlugin({
|
||||||
|
__CI__: !!process.env.CI,
|
||||||
|
__UI_USE_XML_PARSER__: true,
|
||||||
|
__UI_USE_EXTERNAL_RENDERER__: false,
|
||||||
|
__CSS_PARSER__: JSON.stringify('css-tree')
|
||||||
|
}))
|
||||||
|
|
||||||
|
return baseConfig;
|
||||||
|
};
|
Reference in New Issue
Block a user