vuejs / vue-loader

📦 Webpack loader for Vue.js components
MIT License
4.99k stars 915 forks source link

Compilation error when the dynamic argument of a directive contains a bracket #1900

Open BoHuny opened 3 years ago

BoHuny commented 3 years ago

Version

16.8.3

Reproduction link

codesandbox.io

Steps to reproduce

Use an expression containing [] (brackets) inside a dynamic argument for a directive

What is expected?

No compilation error

What is actually happening?

VueCompilerError: Error parsing JavaScript expression: Unexpected token, expected "]"


This used to work on Vue 2