Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literals are not transformed #194

Open
viT-1 opened this issue Oct 24, 2019 · 0 comments
Open

Literals are not transformed #194

viT-1 opened this issue Oct 24, 2019 · 0 comments

Comments

@viT-1
Copy link

viT-1 commented Oct 24, 2019

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)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant