mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(feature)(supersonic-fe) add chat external route (#1407)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import basicConfig from './rollup.config.mjs'
|
import basicConfig from './rollup.config.mjs';
|
||||||
import { terser } from '@rollup/plugin-terser'
|
import terser from '@rollup/plugin-terser';
|
||||||
import replace from '@rollup/plugin-replace'
|
import replace from '@rollup/plugin-replace';
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
...basicConfig,
|
...basicConfig,
|
||||||
@@ -11,22 +11,20 @@ const config = {
|
|||||||
format: 'umd',
|
format: 'umd',
|
||||||
exports: 'named',
|
exports: 'named',
|
||||||
globals: {
|
globals: {
|
||||||
'react': 'React',
|
react: 'React',
|
||||||
'react-dom': 'ReactDOM',
|
'react-dom': 'ReactDOM',
|
||||||
'axios': 'Axios'
|
axios: 'Axios',
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [terser()],
|
||||||
terser()
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
replace({
|
replace({
|
||||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||||
}),
|
}),
|
||||||
...basicConfig.plugins
|
...basicConfig.plugins,
|
||||||
],
|
],
|
||||||
external: ['react', 'react-dom', 'axios']
|
external: ['react', 'react-dom', 'axios'],
|
||||||
}
|
};
|
||||||
|
|
||||||
export default config
|
export default config;
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ const ROUTES = [
|
|||||||
layout: false,
|
layout: false,
|
||||||
envEnableList: [ENV_KEY.CHAT],
|
envEnableList: [ENV_KEY.CHAT],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/chat/external',
|
||||||
|
name: 'chat',
|
||||||
|
component: './ChatPage',
|
||||||
|
hideInMenu: true,
|
||||||
|
layout: false,
|
||||||
|
envEnableList: [ENV_KEY.CHAT],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/chat',
|
path: '/chat',
|
||||||
name: 'chat',
|
name: 'chat',
|
||||||
|
|||||||
Reference in New Issue
Block a user