cleanup(bundling): rename imported vite-tsconfig-paths plugin to matc… (#13423)
This commit is contained in:
parent
9469dbaac9
commit
3c60da7023
@ -305,8 +305,7 @@ describe('Vite Plugin', () => {
|
||||
expect(result.combinedOutput).toContain(
|
||||
`Successfully ran target test for project ${lib}`
|
||||
);
|
||||
}),
|
||||
100_000;
|
||||
}, 100_000);
|
||||
|
||||
it('should be able to run tests with inSourceTests set to true', async () => {
|
||||
runCLI(
|
||||
|
||||
@ -105,14 +105,14 @@ describe('vitest generator', () => {
|
||||
/// <reference types=\\"vitest\\" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import ViteTsConfigPathsPlugin from 'vite-tsconfig-paths';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
||||
react(),
|
||||
ViteTsConfigPathsPlugin({
|
||||
tsconfigPaths({
|
||||
root: '../../',
|
||||
projects: ['tsconfig.base.json'],
|
||||
}),
|
||||
@ -141,14 +141,14 @@ describe('vitest generator', () => {
|
||||
/// <reference types=\\"vitest\\" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import ViteTsConfigPathsPlugin from 'vite-tsconfig-paths';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
||||
react(),
|
||||
ViteTsConfigPathsPlugin({
|
||||
tsconfigPaths({
|
||||
root: '../../',
|
||||
projects: ['tsconfig.base.json'],
|
||||
}),
|
||||
|
||||
@ -414,7 +414,7 @@ export function writeViteConfig(tree: Tree, options: Schema) {
|
||||
${options.includeVitest ? '/// <reference types="vitest" />' : ''}
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import ViteTsConfigPathsPlugin from 'vite-tsconfig-paths';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
${
|
||||
options.includeLib
|
||||
? `import dts from 'vite-plugin-dts';\nimport { join } from 'path';`
|
||||
@ -425,7 +425,7 @@ ${options.includeVitest ? '/// <reference types="vitest" />' : ''}
|
||||
plugins: [
|
||||
${options.includeLib ? dtsPlugin : ''}
|
||||
react(),
|
||||
ViteTsConfigPathsPlugin({
|
||||
tsconfigPaths({
|
||||
root: '${offsetFromRoot(projectConfig.root)}',
|
||||
projects: ['tsconfig.base.json'],
|
||||
}),
|
||||
@ -439,7 +439,7 @@ ${options.includeVitest ? '/// <reference types="vitest" />' : ''}
|
||||
viteConfigContent = `
|
||||
${options.includeVitest ? '/// <reference types="vitest" />' : ''}
|
||||
import { defineConfig } from 'vite';
|
||||
import ViteTsConfigPathsPlugin from 'vite-tsconfig-paths';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
${
|
||||
options.includeLib
|
||||
? `import dts from 'vite-plugin-dts';\nimport { join } from 'path';`
|
||||
@ -449,7 +449,7 @@ ${options.includeVitest ? '/// <reference types="vitest" />' : ''}
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
${options.includeLib ? dtsPlugin : ''}
|
||||
ViteTsConfigPathsPlugin({
|
||||
tsconfigPaths({
|
||||
root: '${offsetFromRoot(projectConfig.root)}',
|
||||
projects: ['tsconfig.base.json'],
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user