bem / webpack-bem-loader

Webpack BEM loader
Other
25 stars 14 forks source link

tech options works incorrectly for different techs on same levels #68

Open Yeti-or opened 6 years ago

Yeti-or commented 6 years ago

For example, we have such options:

                    options : {
                        levels : [
                            'project'
                        ],
                        techmap : {
                            js : ['ts', 'js']
                        }
                    }

and we have two files button.js and button.ts both on level project first on level common second on desktop right now we get:

   [(
require('./project/button/button.ts')).applyDecls()
    ),(
    (
require('./project/button/button.js')).applyDecls()
    )][0]

we will get component that we want (button.ts) but we will applyDecls for button.js it's wrong. In such case, we should use only one — js : ['ts', 'js'] the first one from the array of techMap.