TL;DR extendscriptで書いたコードをparcelやwebpackでビルドしたら、alertの日本語が盛大に文字化けした。 ビルドツールを挟まなければ文字化けしなかった。 webpackのpluginでutf8-bomを付与したら文字化けしなくなった。 はじめに Adobe系ツール1を操作するスクリプト(ExtendScript)を書くなら、現代っ子らしく(?)やっぱり型定義は欲しい! というわけで、TypeScriptでAdobe系ツールの開発をできるように環境を整えました。 せっかくなので、webpackじゃなくてparcelも使いました。 そうしたら、文字化けしました。 文字化けしましたが、その前段階までの環境構築で参考にしたのは以下の記事になります。 TypeScriptでAfterEffects等のAdobeアプリを操作したい - Qiita typescriptで