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

Custom transformers not working for referenced projects #1025

Closed
adam-stanek opened this issue Oct 20, 2019 · 3 comments · Fixed by #1550
Closed

Custom transformers not working for referenced projects #1025

adam-stanek opened this issue Oct 20, 2019 · 3 comments · Fixed by #1550
Labels

Comments

@adam-stanek
Copy link

Hi. I am trying to build a mono-repo project consisting from webpack demo application and separately published library. The library is defined as referenced typescript project (projectReferences: true).
In order to build the library correctly I need custom transformer (@zerollup/ts-transform-paths to transform paths). It seems to be ignored when building the library.

Expected Behaviour

Library code gets emitted while being properly transformed.

Actual Behaviour

Library code gets emitted but no transformation is applied. It is worth mentioning that @zerollup/ts-transform-paths run through ttypescript is working fine.

Steps to Reproduce the Problem

ts-loader options

{
  projectReferences: true,
  getCustomTransformers: require.resolve('./webpack.tsTransformers'),
}

./webpack.tsTransformers.js

const createTsTransformPath = require('@zerollup/ts-transform-paths')

function getCustomTransformers(program) {
  const tsTransformPath = createTsTransformPath(program)

  return {
    before: [tsTransformPath.before],
    // after: [tsTransformPath.afterDeclarations],
  }
}

module.exports = getCustomTransformers

Location of a Minimal Repository that Demonstrates the Issue.

adam-stanek/chobot@8bf5dd2

@stale
Copy link

stale bot commented Dec 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 19, 2019
@stale
Copy link

stale bot commented Dec 26, 2019

Closing as stale. Please reopen if you'd like to work on this further.

@stale stale bot closed this as completed Dec 26, 2019
@unstubbable
Copy link

unstubbable commented Feb 18, 2021

This is also true for typescript-plugin-styled-components, which is mentioned in the REAMDE as an example for getCustomTransformers. I'd like this issue to be reopened.

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