Browse Source

Merge branch 'dev_trial' of https://gitea.free-sun.vip/free-sun/FS-IOT into dev_trial

release_0.0.2
wenlele 3 years ago
parent
commit
8fd9b56cc7
  1. 1
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js
  2. 22
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js
  3. 18
      code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js
  4. 4
      code/VideoAccess-VCMP/api/app/lib/routes/camera/index.js
  5. 7
      code/VideoAccess-VCMP/api/app/lib/service/paasRequest.js
  6. 4
      code/VideoAccess-VCMP/web/client/src/components/simpleFileDownButton.jsx
  7. 144
      code/VideoAccess-VCMP/web/client/src/layout/components/header/index.jsx
  8. 110
      code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx
  9. 317
      code/VideoAccess-VCMP/web/client/src/layout/index.jsx
  10. 111
      code/VideoAccess-VCMP/web/client/src/sections/auth/actions/auth.js
  11. 2
      code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx
  12. 2
      code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/skeletonScreen.jsx
  13. 4
      code/VideoAccess-VCMP/web/webpack.config.js

1
code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js

@ -161,6 +161,7 @@ async function createNvrCamera (ctx) {
})
} else {
createData.push({
type: 'nvr',
serialNo: c.streamid,
name: c.name,
sip: corCamera.sipip,

22
code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

@ -221,23 +221,35 @@ async function banned (ctx) {
}
async function del (ctx) {
const transaction = await ctx.fs.dc.orm.transaction();
try {
const { models } = ctx.fs.dc;
const { cameraId } = ctx.query
const { cameraId } = ctx.params
const { token } = ctx.fs.api
await models.cameraId.destroy({
await models.CameraAbilityBind.destroy({
where: {
cameraId: cameraId
},
transaction
})
await models.Camera.destroy({
where: {
id: cameraId
}
},
transaction
})
if (cameraId.length) {
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraId.join(',') } })
if (cameraId) {
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraId } })
}
await transaction.commit();
ctx.status = 204;
} catch (error) {
await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {}

18
code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js

@ -243,7 +243,20 @@ async function detail (ctx) {
}
const corUser = await ctx.app.fs.authRequest.get(`user/${nvrRes.createUserId}/message`, { query: { token } })
const serverDRes = (await ctx.app.fs.videoServerRequest.post(`gateway/plugins`) || '')
const serverDArr = JSON.parse(serverDRes.replace(/'/g, '"')) || []
const serverDConfig = serverDArr.find(s => s.Name == 'GB28181')
let serveD = {}
if (serverDConfig) {
const { Config } = serverDConfig
let ConfigArr = Config.split('\n')
for (let c of ConfigArr) {
let config = c.split(' = ')
if (config.length == 2) {
serveD[config[0].trim()] = config[1].trim().replace(/\"/g, '')
}
}
}
let nvrDetail = {
...nvrRes.dataValues,
station: bindStations,
@ -251,7 +264,8 @@ async function detail (ctx) {
createUser: {
namePresent: corUser[0].namePresent
},
accessWay: 'GB/T28181'
accessWay: 'GB/T28181',
accessInfo: serveD
}
ctx.status = 200;

4
code/VideoAccess-VCMP/api/app/lib/routes/camera/index.js

@ -35,8 +35,8 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['PUT/camera/banned'] = { content: '禁用摄像头', visible: false };
router.put('/camera/banned', camera.banned);
app.fs.api.logAttr['DEL/camera'] = { content: '删除摄像头', visible: false };
router.delete('/camera', camera.del);
app.fs.api.logAttr['DEL/camera/:cameraId'] = { content: '删除摄像头', visible: false };
router.delete('/camera/:cameraId', camera.del);
app.fs.api.logAttr['GET/camera/export'] = { content: '导出摄像头信息', visible: false };
router.get('/camera/export', camera.cameraExport);

7
code/VideoAccess-VCMP/api/app/lib/service/paasRequest.js

@ -2,9 +2,10 @@
const request = require('superagent')
class paasRequest {
constructor(root, { query = {} } = {}) {
constructor(root, { query = {} } = {}, option) {
this.root = root;
this.query = query
this.option = option
}
#buildUrl = (url) => {
@ -16,7 +17,7 @@ class paasRequest {
if (err) {
reject(err);
} else {
resolve(res.body);
resolve(res[this.option.dataWord]);
}
};
}
@ -51,7 +52,7 @@ function factory (app, opts) {
try {
for (let r of opts.pssaRequest) {
if (r.name && r.root) {
app.fs[r.name] = new paasRequest(r.root, { ...(r.params || {}) })
app.fs[r.name] = new paasRequest(r.root, { ...(r.params || {}) }, { dataWord: r.dataWord || 'body' })
} else {
throw 'opts.pssaRequest 参数错误!'
}

4
code/VideoAccess-VCMP/web/client/src/components/simpleFileDownButton.jsx

@ -23,7 +23,9 @@ const SimpleFileDownButton = (props) => {
>
导出
</Button>
<iframe src={`/_api/${downloadUrl}`} style={{ display: 'none' }} />
{
downloadUrl ? <iframe src={`/_api/${downloadUrl}`} style={{ display: 'none' }} /> : ''
}
</>
)
}

144
code/VideoAccess-VCMP/web/client/src/layout/components/header/index.jsx

@ -4,82 +4,84 @@ import { connect } from "react-redux";
import { Nav, Avatar, Dropdown } from "@douyinfe/semi-ui";
const Header = (props) => {
const { dispatch, history, user, actions, socket } = props;
const { dispatch, history, user, actions, socket } = props;
return (
<>
<Nav
mode={"horizontal"}
onClick={({ itemKey }) => {
if (itemKey == "logout") {
dispatch(actions.auth.logout(user));
if (socket) {
socket.disconnect();
}
history.push(`/signin`);
}
}}
style={{
height: 60,
minWidth: 520,
background: "url(/assets/images/background/header.png)",
backgroundSize: "100% 100%",
color: "white",
}}
header={{
logo: (
<img
src="/assets/images/background/logo.png"
style={{ display: "inline-block", width: 280, height: 52}}
/>
),
text: "",
}}
footer={
<Nav.Sub
itemKey={"user"}
text={
<div
style={{
marginLeft: 20,
display: "inline-block",
color: "white",
}}
>
<img
src="/assets/images/background/notice.png"
style={{
display: "inline-block",
width: 18,
height: 18,
position: "relative",
top: 6,
left: -10,
}}
/>
return (
<>
<Nav
mode={"horizontal"}
onClick={({ itemKey }) => {
if (itemKey == "logout") {
dispatch(actions.auth.logout(user));
const iotAuth = document.getElementById('iotAuth').contentWindow;
iotAuth.postMessage({ action: 'logout' }, '*');
if (socket) {
socket.disconnect();
}
history.push(`/signin`);
}
}}
style={{
height: 60,
minWidth: 520,
background: "url(/assets/images/background/header.png)",
backgroundSize: "100% 100%",
color: "white",
}}
header={{
logo: (
<img
src="/assets/images/background/logo.png"
style={{ display: "inline-block", width: 280, height: 52 }}
/>
),
text: "",
}}
footer={
<Nav.Sub
itemKey={"user"}
text={
<div
style={{
marginLeft: 20,
display: "inline-block",
color: "white",
}}
>
<img
src="/assets/images/background/notice.png"
style={{
display: "inline-block",
width: 18,
height: 18,
position: "relative",
top: 6,
left: -10,
}}
/>
<Avatar size="small" color="light-blue" style={{ margin: 4 }}>
<img src="/assets/images/avatar/6.png" />
</Avatar>
{user && user.namePresent}
</div>
<Avatar size="small" color="light-blue" style={{ margin: 4 }}>
<img src="/assets/images/avatar/6.png" />
</Avatar>
{user && user.namePresent}
</div>
}
>
<Nav.Item itemKey={"logout"} text={"退出"} />
</Nav.Sub>
}
>
<Nav.Item itemKey={"logout"} text={"退出"} />
</Nav.Sub>
}
/>
</>
);
/>
</>
);
};
function mapStateToProps(state) {
const { global, auth, webSocket } = state;
return {
actions: global.actions,
user: auth.user,
socket: webSocket.socket,
};
function mapStateToProps (state) {
const { global, auth, webSocket } = state;
return {
actions: global.actions,
user: auth.user,
socket: webSocket.socket,
};
}
export default connect(mapStateToProps)(Header);

110
code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx

@ -26,7 +26,7 @@ let scrollbar
const LayoutContainer = props => {
const {
dispatch, msg, user, copyright, children, sections, clientWidth, clientHeight,
location, match, routes, history
location, match, routes, history, authCrossLoading
} = props
const [collapsed, setCollapsed] = useState(false)
@ -40,8 +40,6 @@ const LayoutContainer = props => {
}
useEffect(() => {
scrollbar = new PerfectScrollbar('#page-content', { suppressScrollX: true });
window.addEventListener('resize', resize_);
return () => {
window.removeEventListener('resize', resize_);
@ -50,7 +48,7 @@ const LayoutContainer = props => {
useEffect(() => {
NProgress.done();
if (!user || !user.authorized) {
if ((!user || !user.authorized) && !authCrossLoading) {
history.push('/signin');
}
if (msg) {
@ -71,58 +69,74 @@ const LayoutContainer = props => {
}
const dom = document.getElementById('page-content');
if (dom) {
scrollbar.update();
dom.scrollTop = 0;
if (!scrollbar) {
scrollbar = new PerfectScrollbar('#page-content', { suppressScrollX: true });
} else {
scrollbar.update();
dom.scrollTop = 0;
}
}
})
return (
<Layout id="layout">
<Layout.Header>
<Header
user={user}
pathname={location.pathname}
toggleCollapsed={() => {
setCollapsed(!collapsed);
}}
collapsed={collapsed}
history={history}
/>
</Layout.Header>
<Layout>
<Layout.Sider>
<Sider
sections={sections}
dispatch={dispatch}
user={user}
pathname={location.pathname}
collapsed={collapsed}
/>
</Layout.Sider>
<Layout.Content>
{
authCrossLoading ?
<div style={{
margin: '12px 12px 0px',
background: "#F6FAFF",
position: 'absolute', height: '100%', width: '100%',
display: 'flex', alignItems: 'center', placeContent: 'center',
}}>
<div id="page-content" style={{
height: clientHeight - 12,
minWidth: 520,
position: 'relative',
}}>
<div style={{
minHeight: clientHeight - 32 - 12,
position: 'relative',
padding: '12px 8px',
}}>
{children}
</div>
<Layout.Footer>
<Footer />
</Layout.Footer>
</div>
载入中...
</div>
</Layout.Content>
</Layout>
:
<>
<Layout.Header>
<Header
user={user}
pathname={location.pathname}
toggleCollapsed={() => {
setCollapsed(!collapsed);
}}
collapsed={collapsed}
history={history}
/>
</Layout.Header>
<Layout>
<Layout.Sider>
<Sider
sections={sections}
dispatch={dispatch}
user={user}
pathname={location.pathname}
collapsed={collapsed}
/>
</Layout.Sider>
<Layout.Content>
<div style={{
margin: '12px 12px 0px',
background: "#F6FAFF",
}}>
<div id="page-content" style={{
height: clientHeight - 12,
minWidth: 520,
position: 'relative',
}}>
<div style={{
minHeight: clientHeight - 32 - 12,
position: 'relative',
padding: '12px 8px',
}}>
{children}
</div>
<Layout.Footer>
<Footer />
</Layout.Footer>
</div>
</div>
</Layout.Content>
</Layout>
</>
}
</Layout >
)
}

317
code/VideoAccess-VCMP/web/client/src/layout/index.jsx

@ -18,161 +18,184 @@ moment.locale('zh-cn');
const { initLayout, initApiRoot, resize, initWebSocket } = layoutActions;
const Root = props => {
const { sections, title, copyright } = props;
const [history, setHistory] = useState(null)
const [store, setStore] = useState(null)
const [outerRoutes, setOuterRoutes] = useState([])
const [combineRoutes, setCombineRoutes] = useState([])
const [innnerRoutes, setInnerRoutes] = useState([])
const flatRoutes = (routes) => {
const combineRoutes = [];
function flat (routes, parentRoute) {
routes.forEach((route, i) => {
let obj = {
path: route.path,
breadcrumb: route.breadcrumb,
component: route.component || null,
authCode: route.authCode || '',
key: route.key
}
if (!route.path.startsWith("/")) {
console.error('路由配置需以 "/" 开始:' + route.path);
}
if (route.path.length > 1 && route.path[route.path.length] == '/') {
console.error('除根路由路由配置不可以以 "/" 结束:' + route.path);
}
if (parentRoute && parentRoute != '/') {
obj.path = parentRoute + route.path;
}
if (route.exact) {
obj.exact = true
}
if (route.hasOwnProperty('childRoutes')) {
combineRoutes.push(obj);
flat(route.childRoutes, obj.path)
} else {
combineRoutes.push(obj)
}
})
}
flat(routes);
return combineRoutes;
}
const initReducer = (reducers, reducerName, action) => {
let reducerParams = {}
const { actionType, initReducer, reducer } = action()()
if (initReducer || reducer) {
if (reducer) {
if (reducer.name) {
reducerName = reducer.name
}
if (reducer.params) {
reducerParams = reducer.params
}
const { sections, title, copyright } = props;
const [history, setHistory] = useState(null)
const [store, setStore] = useState(null)
const [outerRoutes, setOuterRoutes] = useState([])
const [combineRoutes, setCombineRoutes] = useState([])
const [innnerRoutes, setInnerRoutes] = useState([])
const [authCrossLoading, setAuthCrossLoading] = useState(true)
const flatRoutes = (routes) => {
const combineRoutes = [];
function flat (routes, parentRoute) {
routes.forEach((route, i) => {
let obj = {
path: route.path,
breadcrumb: route.breadcrumb,
component: route.component || null,
authCode: route.authCode || '',
key: route.key
}
if (!route.path.startsWith("/")) {
console.error('路由配置需以 "/" 开始:' + route.path);
}
if (route.path.length > 1 && route.path[route.path.length] == '/') {
console.error('除根路由路由配置不可以以 "/" 结束:' + route.path);
}
if (parentRoute && parentRoute != '/') {
obj.path = parentRoute + route.path;
}
if (route.exact) {
obj.exact = true
}
if (route.hasOwnProperty('childRoutes')) {
combineRoutes.push(obj);
flat(route.childRoutes, obj.path)
} else {
reducerName = `${reducerName}Rslt`
combineRoutes.push(obj)
}
reducers[reducerName] = function (state, action) {
return basicReducer(state, action, Object.assign({ actionType: actionType }, reducerParams));
})
}
flat(routes);
return combineRoutes;
}
const initReducer = (reducers, reducerName, action) => {
let reducerParams = {}
const { actionType, initReducer, reducer } = action()()
if (initReducer || reducer) {
if (reducer) {
if (reducer.name) {
reducerName = reducer.name
}
}
}
useEffect(() => {
let innerRoutes = []
let outerRoutes = []
let reducers = {}
let actions = {
layout: layoutActions
}
for (let s of sections) {
if (!s.key) console.warn('请给你的section添加一个key值,section name:' + s.name);
for (let r of s.routes) {
if (r.type == 'inner' || r.type == 'home') {
innerRoutes.push(r.route)
} else if (r.type == 'outer') {
outerRoutes.push(r.route)
}
if (reducer.params) {
reducerParams = reducer.params
}
if (s.reducers) {
reducers = { ...reducers, ...s.reducers }
} else {
reducerName = `${reducerName}Rslt`
}
reducers[reducerName] = function (state, action) {
return basicReducer(state, action, Object.assign({ actionType: actionType }, reducerParams));
}
}
}
useEffect(() => {
let innerRoutes = []
let outerRoutes = []
let reducers = {}
let actions = {
layout: layoutActions
}
for (let s of sections) {
if (!s.key) console.warn('请给你的section添加一个key值,section name:' + s.name);
for (let r of s.routes) {
if (r.type == 'inner' || r.type == 'home') {
innerRoutes.push(r.route)
} else if (r.type == 'outer') {
outerRoutes.push(r.route)
}
if (s.actions) {
actions = { ...actions, [s.key]: s.actions }
if (s.key != 'auth') {
for (let ak in s.actions) {
let actions = s.actions[ak]
if (actions && typeof actions == 'object') {
for (let actionName in actions) {
initReducer(reducers, actionName, actions[actionName])
}
} else if (typeof actions == 'function') {
initReducer(reducers, ak, actions)
}
}
}
}
if (s.reducers) {
reducers = { ...reducers, ...s.reducers }
}
if (s.actions) {
actions = { ...actions, [s.key]: s.actions }
if (s.key != 'auth') {
for (let ak in s.actions) {
let actions = s.actions[ak]
if (actions && typeof actions == 'object') {
for (let actionName in actions) {
initReducer(reducers, actionName, actions[actionName])
}
} else if (typeof actions == 'function') {
initReducer(reducers, ak, actions)
}
}
}
}
let history = createBrowserHistory();
let store = configStore(reducers, history);
store.dispatch(initLayout(title, copyright, sections, actions));
store.dispatch(resize(document.body.clientHeight, document.body.clientWidth));
store.dispatch(actions.auth.initAuth());
store.dispatch(initWebSocket({}))
store.dispatch(initApiRoot())
const combineRoutes = flatRoutes(innerRoutes);
setInnerRoutes(combineRoutes)
setHistory(history)
setStore(store)
setOuterRoutes(outerRoutes.map(route => (
<Route
key={route.key}
exact
path={route.path}
component={route.component}
/>
)))
setCombineRoutes(combineRoutes.map(route => (
<Route
key={route.key}
exact={route.hasOwnProperty('exact') ? route.exact : true}
path={route.path}
component={route.component}
/>
)))
}, [])
return (
store ?
<ConfigProvider locale={zhCN}>
<Provider store={store}>
<ConnectedRouter history={history}>
}
}
let history = createBrowserHistory();
let store = configStore(reducers, history);
store.dispatch(initLayout(title, copyright, sections, actions));
store.dispatch(resize(document.body.clientHeight, document.body.clientWidth));
store.dispatch(actions.auth.initAuth());
store.dispatch(initWebSocket({}))
store.dispatch(initApiRoot())
const combineRoutes = flatRoutes(innerRoutes);
setInnerRoutes(combineRoutes)
setHistory(history)
setStore(store)
setOuterRoutes(outerRoutes.map(route => (
<Route
key={route.key}
exact
path={route.path}
component={route.component}
/>
)))
setCombineRoutes(combineRoutes.map(route => (
<Route
key={route.key}
exact={route.hasOwnProperty('exact') ? route.exact : true}
path={route.path}
component={route.component}
/>
)))
window.addEventListener('message', async function (e) { // message
const { data } = e
if (data && data.action) {
if (data.action == 'initUser') {
await store.dispatch(actions.auth.initAuth(e.data))
} else if (data.action == 'logout') {
await store.dispatch(actions.auth.logout())
}
}
setAuthCrossLoading(false)
});
}, [])
return (
<>
{
store ?
<ConfigProvider locale={zhCN}>
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
{outerRoutes}
<Layout
history={history}
routes={innnerRoutes}
>
{combineRoutes}
</Layout>
<Route
path={'*'}
component={NoMatch}
/>
{outerRoutes}
<Layout
history={history}
routes={innnerRoutes}
authCrossLoading={authCrossLoading}
>
{combineRoutes}
</Layout>
<Route
path={'*'}
component={NoMatch}
/>
</Switch>
</ConnectedRouter>
</Provider>
</ConfigProvider>
: ''
)
</ConnectedRouter>
</Provider>
</ConfigProvider>
: ''
}
<iframe id="iotAuth" src="http://localhost:5200/cross" style={{ position: 'absolute', top: 0 }} frameBorder={0} >
<p>你的浏览器不支持 iframe</p>
</iframe>
</>
)
}
export default Root;

111
code/VideoAccess-VCMP/web/client/src/sections/auth/actions/auth.js

@ -3,73 +3,78 @@
import { ApiTable, AuthRequest } from '$utils'
export const INIT_AUTH = 'INIT_AUTH';
export function initAuth () {
const user = JSON.parse(sessionStorage.getItem('user')) || {};
return {
type: INIT_AUTH,
payload: {
user: user
}
};
export function initAuth (userData) {
const sessionUser = JSON.parse(sessionStorage.getItem('user'))
const user = userData || sessionUser || {};
if (user.authorized && !sessionUser) {
sessionStorage.setItem('user', JSON.stringify(user))
}
return {
type: INIT_AUTH,
payload: {
user: user
}
};
}
export const REQUEST_LOGIN = 'REQUEST_LOGIN';
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
export const LOGIN_ERROR = 'LOGIN_ERROR';
export function login (username, password) {
return dispatch => {
dispatch({ type: REQUEST_LOGIN });
return dispatch => {
dispatch({ type: REQUEST_LOGIN });
if (!username || !password) {
dispatch({
type: LOGIN_ERROR,
payload: { error: '请输入账号名和密码' }
});
return Promise.resolve();
}
if (!username || !password) {
dispatch({
type: LOGIN_ERROR,
payload: { error: '请输入账号名和密码' }
});
return Promise.resolve();
}
// return dispatch({
// type: LOGIN_SUCCESS,
// payload: {
// user: {
// authorized: true,
// namePresent: 'TEST'
// }
// },
// });
// return dispatch({
// type: LOGIN_SUCCESS,
// payload: {
// user: {
// authorized: true,
// namePresent: 'TEST'
// }
// },
// });
return AuthRequest.post(ApiTable.login, { username, password })
.then(user => {
sessionStorage.setItem('user', JSON.stringify(user));
return dispatch({
type: LOGIN_SUCCESS,
payload: { user: user },
});
}, error => {
let { body } = error.response;
return dispatch({
type: LOGIN_ERROR,
payload: {
error: body && body.message ? body.message : '登录失败'
}
})
return AuthRequest.post(ApiTable.login, { username, password })
.then(user => {
sessionStorage.setItem('user', JSON.stringify(user));
return dispatch({
type: LOGIN_SUCCESS,
payload: { user: user },
});
}
}, error => {
let { body } = error.response;
return dispatch({
type: LOGIN_ERROR,
payload: {
error: body && body.message ? body.message : '登录失败'
}
})
});
}
}
export const LOGOUT = 'LOGOUT';
export function logout (user) {
sessionStorage.removeItem('user');
AuthRequest.put(ApiTable.logout, {
token: user.token
});
return {
type: LOGOUT
};
export function logout () {
const user = JSON.parse(sessionStorage.getItem('user'))
AuthRequest.put(ApiTable.logout, {
token: user.token
});
sessionStorage.removeItem('user');
return {
type: LOGOUT
};
}
export default {
initAuth,
login,
logout
initAuth,
login,
logout
}

2
code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx

@ -20,6 +20,8 @@ const Login = props => {
useEffect(() => {
if (user && user.authorized) {
const iotAuth = document.getElementById('iotAuth').contentWindow;
iotAuth.postMessage({ action: 'login', user: user }, '*');
dispatch(push('/equipmentWarehouse/nvr'));
localStorage.setItem('vcmp_selected_sider', JSON.stringify(['nvr']))
localStorage.setItem('vcmp_open_sider', JSON.stringify(['equipmentWarehouse']))

2
code/VideoAccess-VCMP/web/client/src/sections/equipmentWarehouse/components/skeletonScreen.jsx

@ -1,4 +1,4 @@
import React from "react";
import React, { useState, useEffect } from "react";
import { Table } from "@douyinfe/semi-ui";

4
code/VideoAccess-VCMP/web/webpack.config.js

@ -32,7 +32,9 @@ module.exports = {
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleAnalyzerPlugin(),
new BundleAnalyzerPlugin({
analyzerPort: 8000,
}),
],
module: {
rules: [{

Loading…
Cancel
Save