Skip to content

webpackのjs optimizeがモジュールを壊すことがある #17

Description

@sundaycrafts

v2.1.2において frp build --production をした時に実行されるjsの最適化が、度々既存のモジュールを壊してしまうようです。

sample repogitory(uglifyしているのがgccだと思っていたのでリポジトリ名がそのようになっています):
https://github.com/sundaycrafts/gcc-too-agressive

問題の発生するコード
https://github.com/sundaycrafts/gcc-too-agressive/blob/master/src/js/app.js

問題が発生するモジュール

https://github.com/typekit/webfontloader (v1.6.27)

プロダクションビルドした時に発生するエラー

app.js:1 Uncaught TypeError: a.default.load is not a function()
// webFont.load(option) が正常に動作しておらず、このコードが実行される時点でa.defaultは空オブジェクトになっている

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions