-
Notifications
You must be signed in to change notification settings - Fork 5
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
Doesn't work with typescript 5 #25
Comments
Have you considered to use https://github.com/timocov/ts-transformer-properties-rename instead? I recently upgraded it to support typescript 5 and it is able to do exactly the same as this transformer does (and even more), so I'm curious what could be a reason not to use it. Will wait for your feedback. |
@timocov I've tried to use https://github.com/timocov/ts-transformer-properties-rename but couldn't make it work. How I use import: import minifyPrivatesTransformer from 'ts-transformer-minify-privates'; use in ts-loader rule: {
loader: 'ts-loader',
options: {
transpileOnly,
onlyCompileBundledFiles: true,
compilerOptions: {
target: `es${targetEsVersion}`,
importHelpers: true,
jsx: 'preserve',
noUnusedLocals: false
},
getCustomTransformers: transpileOnly ?
undefined :
(program: ts.Program) => ({
before: [
minifyPrivatesTransformer(program)
]
})
}
} How I try to use const propertiesRenameTransformer = require('ts-transformer-properties-rename').default; First of all, It's weird propertiesRenameTransformer(program, { entrySourceFiles: [entryFile] }) And get an error: But file
Have no idea how to make it work. Please help. |
@dfilatov thanks for detailed explanation, I appreciate it! I've updated this transformer to make it work with the latest typescript version in https://github.com/timocov/ts-transformer-minify-privates/releases/tag/v1.0.0 release and unblock your work. Meanwhile I'll use your feedback to improve https://github.com/timocov/ts-transformer-properties-rename and make transition from to it smoother. |
@timocov Now it works great, thank you! |
Error:
createNode is not a function
The text was updated successfully, but these errors were encountered: