Failed to minify the code from this file: ./node_modules/@sindresorhus/slugify/index.js:7
hblab-huongdv opened this issue · comments
This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in the browser and with Uglify. You can find a more detailed explanation here: sindresorhus/ama#446
If you use Webpack, check out babel-engine-plugin
, which transpiles only the dependencies that needs to be transpiled.
If you use Create React App, upgrade to Create React App v2. It supports automatic transpilation of dependencies, which will make this package just work.
Or you could use https://github.com/terser-js/terser
Thanks