rimeto / ts-optchain

Optional Chaining for TypeScript
MIT License
577 stars 17 forks source link

TypeScript Custom Code Transformer does not work #45

Open unlight opened 5 years ago

unlight commented 5 years ago

Install instruction to setup TypeScript Custom Code Transformer https://github.com/rimeto/ts-optchain#typescript-custom-code-transformer

  1. Using TTypescript Bundle contains
    
    /***/ "./node_modules/ts-optchain/dist/proxy/index.js":
    /*!******************************************************!*\
    !*** ./node_modules/ts-optchain/dist/proxy/index.js ***!
    \******************************************************/
    /*! no static exports found */
    /***/ (function(module, exports, __webpack_require__) {

"use strict";

/**

  1. Same result when using getCustomTransformers of ts-loader Part of webpack.config
                            getCustomTransformers: program => ({
                                before: [
                                    require('ts-optchain/transform').default(program),
                                ]
                            }),

Environment

node 12.6
+-- ts-loader@6.0.2
+-- ts-optchain@0.1.7
+-- ttypescript@1.5.7
`-- typescript@3.5.2
mmontes11 commented 4 years ago

Same problem!

Anyone managed to solve this?

unlight commented 4 years ago

This is not an issue for me, since typescript 3.7 with optional chaining feature.