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
rollupTypes: true - error during build #72
Comments
Can you provide a reproduce repo? |
Hi, I created a repo https://github.com/Qualterink/reproduce-errror-vite-plugin-dts System settings: Distributor ID: Ubuntu Node - v16.14.2 |
@Qualterink I clone your reproduce repo, and run |
I have just ran into this on 3.2.0. The problem was having hyphens in my name, I guess whitespace characters will also cause the same issue. import { resolve } from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, "src/main.ts"),
name: "breaks-with-hyphens-here",
// the proper extensions will be added
fileName: "this-can-be-hyphenated"
},
},
plugins: [
dts({
rollupTypes: true,
insertTypesEntry: true,
}),
],
test: {
coverage: {
provider: "v8",
},
},
}); If I turn off rollupTypes I can see name is used in the file like this export * from './main'
import breaks-with-hyphens-here from './main'
export default breaks-with-hyphens-here which is not valid and breaks the rollup action from working. |
Hi,
when I set attribute 'rollupTypes': true, then I got an error
[vite:dts] Start rollup declaration files...
error during build:
Error: Internal Error: The "default" symbol has a ts.SyntaxKind.ExportAssignment declaration which is not (yet?) supported by API Extractor
You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
"vite": "^2.9.5",
"vite-plugin-dts": "^1.1.1"
The text was updated successfully, but these errors were encountered: