Skip to content

Literals are not transformed #194

Description

@viT-1

Trying to use .babelrc config, but as a result use configuration in a task:
package.json:

"@babel/core": "7.4.4",
"@babel/plugin-transform-template-literals": "7.4.4",
"gulp-babel": "8.0.0",

gulp-task (show in project):

import gBabel from 'gulp-babel';
import gHtml2Js from 'gulp-html-to-js';
import gReplace from 'gulp-replace';

task('tmpl2js',
	() => src([`${absSrc}/**/*.html`])
		.pipe(gHtml2Js())
		.pipe(gReplace('module.exports =', 'export default'))
		// BUG?! Babel is not transformed string/template literals!
		.pipe(gBabel({
			plugins: [
				['@babel/plugin-transform-template-literals'],
			],
		}))
		.pipe(dest(absDest)));

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions