chore(migrate): apps/* to webpack5 (#9606)

This commit is contained in:
Igor Randjelovic
2021-12-21 18:47:33 +01:00
committed by GitHub
parent 04c0f8783d
commit a88cacab89
62 changed files with 643 additions and 404 deletions

View File

@@ -40,4 +40,4 @@ app/app.scss
package-lock.json
!tools/**
!webpack.custom.config.js
!webpack.config.js

View File

@@ -2,11 +2,10 @@ import { NativeScriptConfig } from '@nativescript/core';
export default {
id: 'org.nativescript.ToolBox',
appPath: 'src',
appResourcesPath: '../../tools/assets/App_Resources',
webpackConfigPath: 'webpack.custom.config.js',
android: {
v8Flags: '--expose_gc',
markingMode: 'none',
suppressCallJSMethodExceptions: false,
},
} as NativeScriptConfig;

View File

@@ -1,5 +1,5 @@
{
"main": "main.js",
"main": "src/main.ts",
"description": "NativeScript Application",
"license": "MIT",
"repository": {

View File

@@ -1,5 +1,5 @@
@import '~nativescript-theme-core/css/core.light.css';
@import './app-platform.css';
@import 'nativescript-theme-core/css/core.light.css';
@import './_app-platform.css';
/*
The following CSS rule changes the font size of all UI

View File

@@ -0,0 +1,19 @@
const webpack = require("@nativescript/webpack");
module.exports = (env) => {
webpack.init(env);
webpack.chainWebpack(config => {
config.plugin('DefinePlugin').tap(args => {
Object.assign(args[0], {
__CI__: !!process.env.CI,
})
return args
})
})
return webpack.resolveConfig();
};

View File

@@ -1,18 +0,0 @@
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;
};