packages/cli: make plugin build generate usable declaration maps

This commit is contained in:
Patrik Oldsberg
2020-04-24 12:43:58 +02:00
parent 86a580a235
commit 6e8274969c
@@ -50,6 +50,12 @@ export default {
// The dev folder is for the local plugin serve, ignore it in the build
// If we don't do this we get a folder structure similar to dist/{src,dev}/...
exclude: ['dev'],
compilerOptions: {
// Use absolute path to src dir as root for declarations, relying on the default
// seems to produce declaration maps that are relative to dist/ instead of src/
// Using a relative path like ../src doesn't work either becaus it will be used as is in subdirs.
sourceRoot: paths.resolveTarget('src'),
},
},
clean: true,
}),