我希望生产构建输出只产生 ES2015 构建而不是 ES5 构建。
我正在使用带有常春藤渲染引擎的 Angular 8。
我还附上了我的angular.json、browserslist、tsconfig.json文件。
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"front-end-inventory": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/front-end-inventory",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.webmanifest",
"src/.htaccess"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"scripts": [
"./node_modules/jquery/dist/jquery.slim.min.js"
]
},
"configurations": {
"production": { …
Run Code Online (Sandbox Code Playgroud) 我的表示例包含 has_value 和 has_condition 列,它们是由 laravel 在 MySQL 中创建的布尔类型。在示例表的 Factory 中,我将 faker 值设置为布尔值。在测试用例中,我已经按原样传递了 faker 值。laravel 正确存储该值,但使用assertDatabaseHas 的测试用例失败,因为MySQL 将值存储为数值,但伪造者提供了布尔值。
Schema::create('sample', function (Blueprint $table) {
$table->unsignedBigInteger();
$table->boolean('has_value')->default(false);
$table->boolean('has_condition')->default(false);
});
Run Code Online (Sandbox Code Playgroud)
class Sample extends Model {
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = ['id', 'created_at', 'updated_at'];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'has_condition' …
Run Code Online (Sandbox Code Playgroud) angular ×1
angular-cli ×1
ecmascript-6 ×1
javascript ×1
laravel ×1
mysql ×1
php ×1
phpunit ×1
typescript ×1