-
Notifications
You must be signed in to change notification settings - Fork 16
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
ts-transform-paths with rollup-plugin-typescript2 #11
Comments
Can you provide full example with tsconfig and etc? I use https://github.com/cevek/ttypescript#rollup to inject plugin and include it into config in my demo |
@zerkalica my project: https://github.com/iliyaZelenko/tiptap-vuetify I can try with |
I check your project with ttypescript, it works fine, just use. Sorry, i have no time to dig into buggy rollup plugin (probably problem in it) or your rollup config. g diff -- rollup.config.js
diff --git a/rollup.config.js b/rollup.config.js
index 632c460..f9965bd 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -5,6 +5,7 @@ import alias from 'rollup-plugin-alias'
import postcss from 'rollup-plugin-postcss'
import resolve from 'rollup-plugin-node-resolve'
import { join } from 'path'
+import ttypescript from 'ttypescript'
const isProduction = process.env.BUILD === 'production'
const srtDir = join(__dirname, 'src')
@@ -107,7 +108,8 @@ async function getConfig ({
typescript({
// это фиксит Unknown object type "asyncfunction"
// https://github.com/ezolenko/rollup-plugin-typescript2/issues/105
- clean: true
+ clean: true,
+ typescript: ttypescript,
}),
vue({
defaultLang: { script: 'ts' }, g diff -- tsconfig.json
diff --git a/tsconfig.json b/tsconfig.json
index d51f1f3..a2722ea 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -70,7 +70,10 @@
/* Experimental Options */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
- "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */
+ "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
+ "plugins": [
+ { "transform": "@zerollup/ts-transform-paths" }
+ ]
},
"include": [
"types/**/*", |
@zerkalica thanks for testing this package with Thank you for your package. I will report it works for me or not. |
Everything is working! Thanks, it really helped me. |
Hi, i tried this lib because my
.d.ts
files files generated with paths that have aliases:I stumbled upon your package.
I tried to use this package like with rollup:
and in my rollup plugin property:
I wanted to do as in the code in this example. (pre-header example)
But I get an incomprehensible error:
Can you suggest something? Perhaps there are other packages for this?
The text was updated successfully, but these errors were encountered: