karma-es6-preprocessor
v1.0.1
Published
Simple ES6 preprocessor for Karma
Downloads
30
Maintainers
Readme
karma-es6-preprocessor
Preprocessor for es6 test to add "use strict"; on the fly for compatibility reasons for some browsers.
Example error message:
Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
Installation
Add karma-es6-preprocessor
as a devDependency by:
npm install karma-es6-preprocessor --save-dev
Configuration
Following code shows the default configuration
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.js': ['es6']
},
...
})
}
Disclaimer
This is not an official Google product.