Skip to content

Commit

Permalink
webpack: added custom transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-stanek committed Oct 20, 2019
1 parent 693968c commit 8bf5dd2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/chobot-demo/webpack.config.js
Expand Up @@ -23,6 +23,7 @@ module.exports = {
loader: 'ts-loader',
options: {
projectReferences: true,
getCustomTransformers: require.resolve('./webpack.tsTransformers'),
},
},
],
Expand Down
12 changes: 12 additions & 0 deletions packages/chobot-demo/webpack.tsTransformers.js
@@ -0,0 +1,12 @@
const createTsTransformPath = require('@zerollup/ts-transform-paths')

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

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

module.exports = getCustomTransformers

0 comments on commit 8bf5dd2

Please sign in to comment.