mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: external config loading
+refactor many pieces
This commit is contained in:
committed by
Nathan Walker
parent
04d989c2e6
commit
575130c712
@@ -97,9 +97,9 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('css').use('css-loader') */
|
||||
/* config.module.rule('css').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css-loader'
|
||||
loader: 'css2json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -107,6 +107,10 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
|
||||
{
|
||||
test: /\\\\.scss$/,
|
||||
use: [
|
||||
/* config.module.rule('scss').use('apply-css-loader') */
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('scss').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css2json-loader'
|
||||
@@ -120,6 +124,16 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
defaultVendor: {
|
||||
test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/,
|
||||
priority: -10,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minimizer: [
|
||||
/* config.optimization.minimizer('TerserPlugin') */
|
||||
new TerserPlugin(
|
||||
@@ -142,22 +156,27 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
'__jest__/platforms/android/app/src/main/assets/app/**/*'
|
||||
],
|
||||
verbose: true
|
||||
verbose: false
|
||||
}
|
||||
),
|
||||
/* config.plugin('DefinePlugin') */
|
||||
new DefinePlugin(
|
||||
{
|
||||
'global.NS_WEBPACK': true,
|
||||
__DEV__: true,
|
||||
__NS_WEBPACK__: true,
|
||||
__CSS_PARSER__: '\\"css-tree\\"',
|
||||
__ANDROID__: true,
|
||||
__IOS__: false,
|
||||
'global.isAndroid': true,
|
||||
'global.isIOS': false,
|
||||
process: 'global.process',
|
||||
profile: '() => {}',
|
||||
__DEV__: 'true',
|
||||
__TEST__: 'false',
|
||||
'process.env.NODE_ENV': '\\"development\\"'
|
||||
}
|
||||
),
|
||||
/* config.plugin('BundleAnalyzerPlugin') */
|
||||
new BundleAnalyzerPlugin(),
|
||||
/* config.plugin('WatchStateLoggerPlugin') */
|
||||
new WatchStateLoggerPlugin(),
|
||||
/* config.plugin('ReactRefreshWebpackPlugin') */
|
||||
@@ -273,9 +292,9 @@ exports[`react configuration > android > base config 1`] = `
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('css').use('css-loader') */
|
||||
/* config.module.rule('css').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css-loader'
|
||||
loader: 'css2json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -283,6 +302,10 @@ exports[`react configuration > android > base config 1`] = `
|
||||
{
|
||||
test: /\\\\.scss$/,
|
||||
use: [
|
||||
/* config.module.rule('scss').use('apply-css-loader') */
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('scss').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css2json-loader'
|
||||
@@ -296,6 +319,16 @@ exports[`react configuration > android > base config 1`] = `
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
defaultVendor: {
|
||||
test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/,
|
||||
priority: -10,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minimizer: [
|
||||
/* config.optimization.minimizer('TerserPlugin') */
|
||||
new TerserPlugin(
|
||||
@@ -318,22 +351,27 @@ exports[`react configuration > android > base config 1`] = `
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
'__jest__/platforms/android/app/src/main/assets/app/**/*'
|
||||
],
|
||||
verbose: true
|
||||
verbose: false
|
||||
}
|
||||
),
|
||||
/* config.plugin('DefinePlugin') */
|
||||
new DefinePlugin(
|
||||
{
|
||||
'global.NS_WEBPACK': true,
|
||||
__DEV__: true,
|
||||
__NS_WEBPACK__: true,
|
||||
__CSS_PARSER__: '\\"css-tree\\"',
|
||||
__ANDROID__: true,
|
||||
__IOS__: false,
|
||||
'global.isAndroid': true,
|
||||
'global.isIOS': false,
|
||||
process: 'global.process',
|
||||
profile: '() => {}',
|
||||
__DEV__: 'true',
|
||||
__TEST__: 'false',
|
||||
'process.env.NODE_ENV': '\\"development\\"'
|
||||
}
|
||||
),
|
||||
/* config.plugin('BundleAnalyzerPlugin') */
|
||||
new BundleAnalyzerPlugin(),
|
||||
/* config.plugin('WatchStateLoggerPlugin') */
|
||||
new WatchStateLoggerPlugin()
|
||||
],
|
||||
@@ -442,9 +480,9 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('css').use('css-loader') */
|
||||
/* config.module.rule('css').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css-loader'
|
||||
loader: 'css2json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -452,6 +490,10 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
|
||||
{
|
||||
test: /\\\\.scss$/,
|
||||
use: [
|
||||
/* config.module.rule('scss').use('apply-css-loader') */
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('scss').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css2json-loader'
|
||||
@@ -465,6 +507,16 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
defaultVendor: {
|
||||
test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/,
|
||||
priority: -10,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minimizer: [
|
||||
/* config.optimization.minimizer('TerserPlugin') */
|
||||
new TerserPlugin(
|
||||
@@ -487,22 +539,27 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
'__jest__/platforms/ios/__jest__/app/**/*'
|
||||
],
|
||||
verbose: true
|
||||
verbose: false
|
||||
}
|
||||
),
|
||||
/* config.plugin('DefinePlugin') */
|
||||
new DefinePlugin(
|
||||
{
|
||||
'global.NS_WEBPACK': true,
|
||||
__DEV__: true,
|
||||
__NS_WEBPACK__: true,
|
||||
__CSS_PARSER__: '\\"css-tree\\"',
|
||||
__ANDROID__: false,
|
||||
__IOS__: true,
|
||||
'global.isAndroid': false,
|
||||
'global.isIOS': true,
|
||||
process: 'global.process',
|
||||
profile: '() => {}',
|
||||
__DEV__: 'true',
|
||||
__TEST__: 'false',
|
||||
'process.env.NODE_ENV': '\\"development\\"'
|
||||
}
|
||||
),
|
||||
/* config.plugin('BundleAnalyzerPlugin') */
|
||||
new BundleAnalyzerPlugin(),
|
||||
/* config.plugin('WatchStateLoggerPlugin') */
|
||||
new WatchStateLoggerPlugin(),
|
||||
/* config.plugin('ReactRefreshWebpackPlugin') */
|
||||
@@ -621,9 +678,9 @@ exports[`react configuration > ios > base config 1`] = `
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('css').use('css-loader') */
|
||||
/* config.module.rule('css').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css-loader'
|
||||
loader: 'css2json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -631,6 +688,10 @@ exports[`react configuration > ios > base config 1`] = `
|
||||
{
|
||||
test: /\\\\.scss$/,
|
||||
use: [
|
||||
/* config.module.rule('scss').use('apply-css-loader') */
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('scss').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css2json-loader'
|
||||
@@ -644,6 +705,16 @@ exports[`react configuration > ios > base config 1`] = `
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
defaultVendor: {
|
||||
test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/,
|
||||
priority: -10,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minimizer: [
|
||||
/* config.optimization.minimizer('TerserPlugin') */
|
||||
new TerserPlugin(
|
||||
@@ -666,22 +737,27 @@ exports[`react configuration > ios > base config 1`] = `
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
'__jest__/platforms/ios/__jest__/app/**/*'
|
||||
],
|
||||
verbose: true
|
||||
verbose: false
|
||||
}
|
||||
),
|
||||
/* config.plugin('DefinePlugin') */
|
||||
new DefinePlugin(
|
||||
{
|
||||
'global.NS_WEBPACK': true,
|
||||
__DEV__: true,
|
||||
__NS_WEBPACK__: true,
|
||||
__CSS_PARSER__: '\\"css-tree\\"',
|
||||
__ANDROID__: false,
|
||||
__IOS__: true,
|
||||
'global.isAndroid': false,
|
||||
'global.isIOS': true,
|
||||
process: 'global.process',
|
||||
profile: '() => {}',
|
||||
__DEV__: 'true',
|
||||
__TEST__: 'false',
|
||||
'process.env.NODE_ENV': '\\"development\\"'
|
||||
}
|
||||
),
|
||||
/* config.plugin('BundleAnalyzerPlugin') */
|
||||
new BundleAnalyzerPlugin(),
|
||||
/* config.plugin('WatchStateLoggerPlugin') */
|
||||
new WatchStateLoggerPlugin()
|
||||
],
|
||||
|
||||
@@ -88,9 +88,9 @@ exports[`vue configuration for android 1`] = `
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('css').use('css-loader') */
|
||||
/* config.module.rule('css').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css-loader'
|
||||
loader: 'css2json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -98,6 +98,10 @@ exports[`vue configuration for android 1`] = `
|
||||
{
|
||||
test: /\\\\.scss$/,
|
||||
use: [
|
||||
/* config.module.rule('scss').use('apply-css-loader') */
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('scss').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css2json-loader'
|
||||
@@ -124,6 +128,16 @@ exports[`vue configuration for android 1`] = `
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
defaultVendor: {
|
||||
test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/,
|
||||
priority: -10,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minimizer: [
|
||||
/* config.optimization.minimizer('TerserPlugin') */
|
||||
new TerserPlugin(
|
||||
@@ -148,19 +162,25 @@ exports[`vue configuration for android 1`] = `
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
'__jest__/platforms/android/app/src/main/assets/app/**/*'
|
||||
],
|
||||
verbose: true
|
||||
verbose: false
|
||||
}
|
||||
),
|
||||
/* config.plugin('DefinePlugin') */
|
||||
new DefinePlugin(
|
||||
{
|
||||
'global.NS_WEBPACK': true,
|
||||
__DEV__: true,
|
||||
__NS_WEBPACK__: true,
|
||||
__CSS_PARSER__: '\\"css-tree\\"',
|
||||
__ANDROID__: true,
|
||||
__IOS__: false,
|
||||
'global.isAndroid': true,
|
||||
'global.isIOS': false,
|
||||
process: 'global.process',
|
||||
profile: '() => {}'
|
||||
}
|
||||
),
|
||||
/* config.plugin('BundleAnalyzerPlugin') */
|
||||
new BundleAnalyzerPlugin(),
|
||||
/* config.plugin('WatchStateLoggerPlugin') */
|
||||
new WatchStateLoggerPlugin()
|
||||
],
|
||||
@@ -260,9 +280,9 @@ exports[`vue configuration for ios 1`] = `
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('css').use('css-loader') */
|
||||
/* config.module.rule('css').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css-loader'
|
||||
loader: 'css2json-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -270,6 +290,10 @@ exports[`vue configuration for ios 1`] = `
|
||||
{
|
||||
test: /\\\\.scss$/,
|
||||
use: [
|
||||
/* config.module.rule('scss').use('apply-css-loader') */
|
||||
{
|
||||
loader: 'apply-css-loader'
|
||||
},
|
||||
/* config.module.rule('scss').use('css2json-loader') */
|
||||
{
|
||||
loader: 'css2json-loader'
|
||||
@@ -296,6 +320,16 @@ exports[`vue configuration for ios 1`] = `
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
defaultVendor: {
|
||||
test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/,
|
||||
priority: -10,
|
||||
name: 'vendor',
|
||||
chunks: 'all'
|
||||
}
|
||||
}
|
||||
},
|
||||
minimizer: [
|
||||
/* config.optimization.minimizer('TerserPlugin') */
|
||||
new TerserPlugin(
|
||||
@@ -320,19 +354,25 @@ exports[`vue configuration for ios 1`] = `
|
||||
cleanOnceBeforeBuildPatterns: [
|
||||
'__jest__/platforms/ios/__jest__/app/**/*'
|
||||
],
|
||||
verbose: true
|
||||
verbose: false
|
||||
}
|
||||
),
|
||||
/* config.plugin('DefinePlugin') */
|
||||
new DefinePlugin(
|
||||
{
|
||||
'global.NS_WEBPACK': true,
|
||||
__DEV__: true,
|
||||
__NS_WEBPACK__: true,
|
||||
__CSS_PARSER__: '\\"css-tree\\"',
|
||||
__ANDROID__: false,
|
||||
__IOS__: true,
|
||||
'global.isAndroid': false,
|
||||
'global.isIOS': true,
|
||||
process: 'global.process',
|
||||
profile: '() => {}'
|
||||
}
|
||||
),
|
||||
/* config.plugin('BundleAnalyzerPlugin') */
|
||||
new BundleAnalyzerPlugin(),
|
||||
/* config.plugin('WatchStateLoggerPlugin') */
|
||||
new WatchStateLoggerPlugin()
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user