mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 02:28:04 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			920 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			920 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const path = require('path');
 | 
						|
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
 | 
						|
 | 
						|
const { defineConfig } = require('@vue/cli-service');
 | 
						|
 | 
						|
module.exports = defineConfig({
 | 
						|
  transpileDependencies: true,
 | 
						|
 | 
						|
  lintOnSave: true,
 | 
						|
 | 
						|
  indexPath: 'index.html',
 | 
						|
 | 
						|
  outputDir: path.resolve(__dirname, './dist'),
 | 
						|
 | 
						|
  devServer: {
 | 
						|
    port: 8181,
 | 
						|
    proxy: {
 | 
						|
      '/api': {
 | 
						|
        target: 'http://localhost:3001/',
 | 
						|
        ws: true,
 | 
						|
        changOrigin: true,
 | 
						|
      },
 | 
						|
      '/runtime': {
 | 
						|
        target: 'http://localhost:3001/',
 | 
						|
        ws: true,
 | 
						|
        changOrigin: true,
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
 | 
						|
  configureWebpack: {
 | 
						|
    devtool: 'source-map',
 | 
						|
    entry: '@src/main.ts',
 | 
						|
 | 
						|
    resolve: {
 | 
						|
      alias: {
 | 
						|
        vue$: path.resolve(__dirname, './node_modules/vue/dist/vue.runtime.esm-bundler.js'),
 | 
						|
        '@src': path.resolve(__dirname, './src'),
 | 
						|
      },
 | 
						|
    },
 | 
						|
 | 
						|
    plugins: [new MonacoWebpackPlugin()],
 | 
						|
  },
 | 
						|
});
 |