Skip to content

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

@sundaycrafts

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は空オブジェクトになっている

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