Closed
Description
Version
3.0.1
Node and OS info
Node v8.11.3 / Yarn 1.3.2 / Mac OSX
Steps to reproduce
- Generate project using vue-cli-3 with typescript support.
- Trying to register Global components in main.ts file with steps provided here (steps for none-ts project https://vuejs.org/v2/guide/components-registration.html#Automatic-Global-Registration-of-Base-Components)
code snippet:
const requireComponents = require.context('./components/common/', false, '/\.vue$/')
now while doing yarn serve
it breaks the build with error
ERROR in src/main.ts
9:34 Property 'context' does not exist on type 'NodeRequire'.
What is expected?
require.context should be allowed in ts definitions for import.
What is actually happening?
context
method no available on NodeRequire