Closed web-padawan closed 5 years ago
Thanks for this report. Could you link an example babelrc which exposes this problem? I'm guessing this happens when transpiling for legacy browsers without support for JS template literals?
Yes, happens in ES5 build for IE11, will share a link to the branch in my webpack starter with a reproduction
Sorry for the delay, the configuration I am using is here web-padawan/polymer3-webpack-starter#22
Especially, it relies on webpack-babel-multi-target-plugin
and the relevant part of config is here: https://github.com/web-padawan/polymer3-webpack-starter/blob/ca2c579c6026a94e62e6fbc73335a07bde33043f/webpack.config.js#L89
Steps to reproduce:
npm i
npm run build
npm start
Code minified with 2.1.2 below, note
[void 0]
being passed as first argument:Not minified code does not contain this, but contains both
strings
andraw
:Looks like both "strings" and "raw" should be passed to
babelHelpers.taggedTemplateLiteral
: https://github.com/babel/babel/blob/bc347bab7aeb2a1d14c22443648134ba124311db/packages/babel-helpers/src/helpers.js#L761