修复:打包后stomp undefined的问题
This commit is contained in:
parent
fcee51937a
commit
f34b66c2f3
@ -7,12 +7,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var Stomp, net, overTCP, overWS, wrapTCP, wrapWS;
|
let net, overTCP, overWS, wrapTCP, wrapWS;
|
||||||
|
|
||||||
Stomp = require('./stomp');
|
const Stomp = require('./stomp.js');
|
||||||
|
|
||||||
net = require('net');
|
net = require('net');
|
||||||
|
|
||||||
|
Stomp.Stomp = window.Stomp
|
||||||
|
|
||||||
Stomp.Stomp.setInterval = function(interval, f) {
|
Stomp.Stomp.setInterval = function(interval, f) {
|
||||||
return setInterval(f, interval);
|
return setInterval(f, interval);
|
||||||
};
|
};
|
||||||
@ -101,8 +103,11 @@
|
|||||||
return Stomp.Stomp.over(socket);
|
return Stomp.Stomp.over(socket);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.overTCP = overTCP;
|
if (typeof exports !== "undefined" && exports !== null) {
|
||||||
|
|
||||||
exports.overWS = overWS;
|
exports.overTCP = overTCP;
|
||||||
|
|
||||||
|
exports.overWS = overWS;
|
||||||
|
}
|
||||||
|
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|||||||
@ -39,7 +39,7 @@ module.exports = {
|
|||||||
*然后publicPath应该设置为“ / bar /”。
|
*然后publicPath应该设置为“ / bar /”。
|
||||||
*在大多数情况下,请使用'/'!
|
*在大多数情况下,请使用'/'!
|
||||||
*详细信息:https://cli.vuejs.org/config/#publicpath
|
*详细信息:https://cli.vuejs.org/config/#publicpath
|
||||||
*/
|
*/
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
outputDir: 'dist',
|
outputDir: 'dist',
|
||||||
assetsDir: 'static',
|
assetsDir: 'static',
|
||||||
@ -55,7 +55,6 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: 'http://localhost:8088/',
|
target: 'http://localhost:8088/',
|
||||||
// target: `http://127.0.0.1:${port}/mock`,
|
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
@ -63,7 +62,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
[process.env.VUE_APP_BASE_FILE_API]: {
|
[process.env.VUE_APP_BASE_FILE_API]: {
|
||||||
target: 'http://localhost:10010/',
|
target: 'http://localhost:10010/',
|
||||||
// target: `http://127.0.0.1:${port}/mock`,
|
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_FILE_API]: ''
|
['^' + process.env.VUE_APP_BASE_FILE_API]: ''
|
||||||
@ -71,18 +69,16 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
[process.env.VUE_APP_BASE_PRIVIEW_API]: {
|
[process.env.VUE_APP_BASE_PRIVIEW_API]: {
|
||||||
target: 'http://localhost:8012/',
|
target: 'http://localhost:8012/',
|
||||||
// target: `http://127.0.0.1:${port}/mock`,
|
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_PRIVIEW_API]: ''
|
['^' + process.env.VUE_APP_BASE_PRIVIEW_API]: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// before: require('./mock/mock-server.js')
|
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
//在webpack的名称字段中提供应用程序的标题,以便
|
//在webpack的名称字段中提供应用程序的标题,以便
|
||||||
//可以在index.html中对其进行访问以注入正确的标题。
|
//可以在index.html中对其进行访问以注入正确的标题。
|
||||||
name: name,
|
name: name,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@ -96,7 +92,6 @@ module.exports = {
|
|||||||
|
|
||||||
config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
|
config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
|
||||||
{
|
{
|
||||||
// Languages are loaded on demand at runtime
|
|
||||||
languages: [
|
languages: [
|
||||||
"json","abap", "apex", "azcli", "bat", "cameligo","clojure", "coffee", "cpp", "yaml",
|
"json","abap", "apex", "azcli", "bat", "cameligo","clojure", "coffee", "cpp", "yaml",
|
||||||
"csharp", "csp", "css","dockerfile", "fsharp", "go", "graphql", "handlebars","html", "ini",
|
"csharp", "csp", "css","dockerfile", "fsharp", "go", "graphql", "handlebars","html", "ini",
|
||||||
@ -138,7 +133,6 @@ module.exports = {
|
|||||||
.end()
|
.end()
|
||||||
|
|
||||||
config
|
config
|
||||||
// https://webpack.js.org/configuration/devtool/#development
|
|
||||||
.when(process.env.NODE_ENV === 'development',
|
.when(process.env.NODE_ENV === 'development',
|
||||||
config => config.devtool('cheap-source-map')
|
config => config.devtool('cheap-source-map')
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user