Answer the question
In order to leave comments, you need to log in
Why doesn't babel convert ES6 in one of the modules?
I use this module
in the project, I load it via npm.
I connect like this: const striptags = require('striptags') or like this: import striptags from 'striptags';
Contents of the .babelrc project:
{
"presets": ["es2015", "stage-0", "react"]
}
const STATE_PLAINTEXT = Symbol('plaintext');
const STATE_HTML = Symbol('html');
const STATE_COMMENT = Symbol('comment');
...
var STATE_PLAINTEXT = Symbol('plaintext');
var STATE_HTML = Symbol('html');
var STATE_COMMENT = Symbol('comment');
...
Answer the question
In order to leave comments, you need to log in
Babel will not transpiler node_modules unless it is told to do so in the webpack conf, a
Ups: I'll get to my computer and check your npm module.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question