feat: expose terser config

オープン
#4,425 コメント 0 件 リアクション 5 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

src/declarations/stencil-public-compiler.ts の StencilConfig 宣言と、src/compiler/optimize/optimize-module.ts の terser 設定の生成から始めます。既存の minifyJs 設定がその設定にどのように到達するかを追跡し、続いてユーザーオプションと Stencil のターゲット依存のデフォルト値に対する動作を定義して検証します。これには、console の削除とクラス名の使用のユースケースを含めます。

索引モデルが issue の本文から書いたものです。

説明

Feature: Want this? Upvote it!
Prerequisites
Describe the Feature Request

Expose the terser config so developers can change it.

Describe the Use Case
  • removing console.logs
  • not minifying class names
Describe Preferred Solution

Add a new item terserConfig to StencilConfig

Describe Alternatives

Allow adding terser options to StencilConfig.minifyJs

Related Code

Generating terser config: https://github.com/ionic-team/stencil/blob/b935cc4d3c522ea0de49d3b3547ffe8088139066/src/compiler/optimize/optimize-module.ts#L128

Additional Information
  • Since Stencil adjusts the configuration based on variables like the source target we need to define how to handle this. Should the user config always override the default options?
  • Related issue: https://github.com/ionic-team/stencil/issues/2686
主要言語
TypeScript
スター
13.2k
フォーク
865
平均マージ
2日 16時間
マージ済み PR(30日)
29

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stenciljs/core のほかの issue

stenciljs/core の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。