Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Trying to use ts loader in happypack, getting 'loader._compiler.plugin is not a function' #40

Closed
aleksclark opened this issue May 3, 2016 · 2 comments

Comments

@aleksclark
Copy link

aleksclark commented May 3, 2016

What the title says, basically:

let loaders: webpack.Loader[] = [
  // Compile TypeScript
  { test: /\.ts$/, loader: 'happypack/loader?id=tsx', exclude: [ /\.(spec|e2e)\.ts$/ ] },
]

plugins.push(new HappyPack({
  id: 'tsx',
  threadPool: happyThreadPool,
  loaders: ['ts'],
}));
@amireh
Copy link
Owner

amireh commented May 7, 2016

That's because the loader is trying to directly access webpack's compiler to register a plugin, which isn't supported in HappyPack (since webpack's compiler lives in the main process).

These loaders need to be rewritten in a way to not rely webpack's internals. I'm working on ts-loader support in #33 so you can track the progress there.

@amireh
Copy link
Owner

amireh commented May 7, 2016

Closing as duplicate of #33.

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

No branches or pull requests

2 participants