TypeStrong / TypeStrong/ts-loader

TypeError: loaderContext.getOptions is not a function

Open
#1,484 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.5k
Forks
439
Avg merge
17h 17m
Merged PRs (30d)
2

Description

yntax Error: TypeError: loaderContext.getOptions is not a function

@ multi (webpack)-dev-server/client?http://localhost:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

I upgraded my app from vue 3 js to vue 3 typescript and this error occurs when i try to start the dev server:

I tried to downgrade webpack to version 4, also the ts-loader to 8.2.0 and node version but non of these works.

Does anybody solved this issue?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported Vue 3 TypeScript app startup failure with the webpack dev server, then inspect the webpack and ts-loader versions involved in the compatibility error. Done means the development server starts without the loaderContext.getOptions TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.