-
Notifications
You must be signed in to change notification settings - Fork 91
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
Upgrading from v2.3.0 to v3.4.0 causes 'Outside emitted #258
Labels
bug
Something isn't working
Comments
You need to provide your |
Apologies, I had meant to! Vite.config.ts: import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import svgLoader from 'vite-svg-loader';
import dts from 'vite-plugin-dts';
import { resolve } from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
svgLoader(),
dts({
insertTypesEntry: true,
}),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
build: {
lib: {
entry: resolve(__dirname, 'src/main.ts'),
name: 'adtech_sky_analytics_vue_component_library',
},
rollupOptions: {
input: {
main: resolve(__dirname, 'src/main.ts'),
},
external: ['vue'],
output: {
// Provide global variables to use in the UMD build
// Add external deps here
globals: {
vue: 'Vue',
},
exports: 'named',
assetFileNames: (assetInfo): string => {
if (assetInfo.name === 'style.css') {
return 'adtech-sky-analytics-vue-component-library.css';
}
return assetInfo.name || '';
},
},
},
},
}); tsconfig.json: {
"extends": "../../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"compilerOptions": {
"baseUrl": ".",
"types": ["vite/client"],
"isolatedModules": true,
"paths": {
"@/*": ["./src/*"],
"vite-svg-loader": ["node_modules/vite-svg-loader"]
},
"strictNullChecks": false
},
"exclude": ["**/*.stories.ts"]
} Root tsconfig.json: {
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true,
"declaration": true,
"declarationDir": "./types",
"types": ["vitest/globals"],
"paths": {
"*": [
"./node_modules/*",
"./test/*"
]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "test/**/*.ts"],
"exclude": ["scripts/bundle/**"],
"references": [{ "path": "./tsconfig.node.json" }]
}
|
Found the issue! The problem was the declarationDir in my tsconfig. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using 2.3.0 on my vue component library, the declaration files were generated correctly and I never had any issues.
When I do an upgrade to v3.4.0 with no other config changes I get the following;
The .d.ts files are no longer being output into dist/**.
Was there a change in how these were generated or is there another config option that I need?
Project structure:
/root/packages/components/**
Expected Output:
root/packages/components/dist/**
Actual Output:
root/types/components/**
Reproduction
ffve
Steps to reproduce
No response
System Info
Validations
The text was updated successfully, but these errors were encountered: