mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-03 22:57:14 +08:00 
			
		
		
		
	和 unplugin-vue-components 按需加载插件有关,注释掉了相关按需引入,改为全局引入样式 Closes https://github.com/arco-design/arco-design-pro-vue/issues/338
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { resolve } from 'path';
 | 
						|
import { defineConfig } from 'vite';
 | 
						|
import vue from '@vitejs/plugin-vue';
 | 
						|
import vueJsx from '@vitejs/plugin-vue-jsx';
 | 
						|
import svgLoader from 'vite-svg-loader';
 | 
						|
// import configArcoStyleImportPlugin from './plugin/arcoStyleImport';
 | 
						|
 | 
						|
export default defineConfig({
 | 
						|
  plugins: [
 | 
						|
    vue(),
 | 
						|
    vueJsx(),
 | 
						|
    svgLoader({ svgoConfig: {} }),
 | 
						|
    // configArcoStyleImportPlugin(),
 | 
						|
  ],
 | 
						|
  resolve: {
 | 
						|
    alias: [
 | 
						|
      {
 | 
						|
        find: '@',
 | 
						|
        replacement: resolve(__dirname, '../src'),
 | 
						|
      },
 | 
						|
      {
 | 
						|
        find: 'assets',
 | 
						|
        replacement: resolve(__dirname, '../src/assets'),
 | 
						|
      },
 | 
						|
      {
 | 
						|
        find: 'vue-i18n',
 | 
						|
        replacement: 'vue-i18n/dist/vue-i18n.cjs.js', // Resolve the i18n warning issue
 | 
						|
      },
 | 
						|
      {
 | 
						|
        find: 'vue',
 | 
						|
        replacement: 'vue/dist/vue.esm-bundler.js', // compile template
 | 
						|
      },
 | 
						|
    ],
 | 
						|
    extensions: ['.ts', '.js'],
 | 
						|
  },
 | 
						|
  define: {
 | 
						|
    'process.env': {},
 | 
						|
  },
 | 
						|
  css: {
 | 
						|
    preprocessorOptions: {
 | 
						|
      less: {
 | 
						|
        modifyVars: {
 | 
						|
          hack: `true; @import (reference) "${resolve(
 | 
						|
            'src/assets/style/breakpoint.less'
 | 
						|
          )}";`,
 | 
						|
        },
 | 
						|
        javascriptEnabled: true,
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
});
 |