1

I'm using the Vue CLI and have my project building with modern mode. I'm noticing that any of the JS files I include from node_modules from Vue files are minified but let, const, and arrow functions are not being replaced. This is the case even in my legacy bundles. My own JS files are processed correctly. All my Vue files process fine.

Anyone know how I can get Babel to process included JS files and not just minify them?

Thanks

1 Answer 1

1

The answer is to use Vue cli's transpileDependencies option. Just set it to an array of Regex to match your dependencies that need compiling.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.