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