-
-
Notifications
You must be signed in to change notification settings - Fork 58
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Version
System: macos14.3.1
npmPackages: pnpm
Rslib 0.1.12Details
rslib.config.ts
import { defineConfig } from '@rslib/core';
import { pluginVue } from '@rsbuild/plugin-vue';
import { pluginVueJsx } from '@rsbuild/plugin-vue-jsx';
import { pluginBabel } from '@rsbuild/plugin-babel';
export default defineConfig({
resolve: {
alias: {
'@': './src'
}
},
source: {
entry: {
index: ['./src/**']
}
},
lib: [
{
bundle: false,
dts: true,
format: 'esm'
}
],
output: {
target: 'web'
},
plugins: [
pluginBabel({
include: /\.(?:jsx|tsx)$/
}),
pluginVue(),
pluginVueJsx()
],
tools: {
rspack: {
plugins: [
require('unplugin-vue-macros/rspack')({
// 覆盖插件选项
vue: pluginVue(),
vueJsx: pluginVueJsx()
})
]
}
}
});tsconfig.json
{
"compilerOptions": {
"lib": ["DOM", "ES2021"],
"module": "ESNext",
"jsx": "preserve",
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
"strict": true,
"skipLibCheck": true,
"isolatedModules": true,
"resolveJsonModule": true,
"moduleResolution": "bundler",
"useDefineForClassFields": true,
"target": "esnext",
"baseUrl": ".",
"noImplicitAny": false,
"types": ["unplugin-vue-macros/macros-global"],
"paths": {
"@/*": [
"./src/*"
]
},
},
"vueCompilerOptions": {
"plugins": ["unplugin-vue-macros/volar"],
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
}after building, the path alias is not processed
Reproduce link
https://github.com/Lisheri/rslib_vue_components
Reproduce Steps
pnpm i
pnpm build
see dist/index.js
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working

