Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add loaderContext._compiler, is important #27

Open
crayon-shin-chan opened this issue May 12, 2018 · 3 comments
Open

add loaderContext._compiler, is important #27

crayon-shin-chan opened this issue May 12, 2018 · 3 comments

Comments

@crayon-shin-chan
Copy link

awesome-typescript-loader need access loaderContext._compiler

TypeError: Cannot read property 'parentCompilation' of undefined
at Object.getRootCompiler (/home/czy/桌面/react-demo/node_modules/awesome-typescript-loader/src/instance.ts:67:15)
at compiler (/home/czy/桌面/react-demo/node_modules/awesome-typescript-loader/src/index.ts:42:23)
at Object.loader (/home/czy/桌面/react-demo/node_modules/awesome-typescript-loader/src/index.ts:16:12)
at LOADER_EXECUTION (/home/czy/桌面/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
at runSyncOrAsync (/home/czy/桌面/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
at iterateNormalLoaders (/home/czy/桌面/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
at /home/czy/桌面/react-demo/node_modules/loader-runner/lib/LoaderRunner.js:202:4

@crayon-shin-chan
Copy link
Author

normal build time is 5000ms

if i do it like this:
webpack: true,
'thread-loader': true
sourceMap: data.sourceMap,
_compiler: new Compiler(process.cwd())
it will waste more time , 15000ms

@crayon-shin-chan
Copy link
Author

if it means threads must share one Compiler?

@lishichao1002
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants