Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/dynamic load error #4114

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
library: 'hippyReactBase',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
// publicPath: 'https://xxx/hippy/hippyReactDemo/',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
library: 'hippyReactBase',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
// publicPath: 'https://xxx/hippy/hippyReactDemo/',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
globalObject: '(0, eval)("this")',
},
plugins: [
new webpack.NamedModulesPlugin(),
new HtmlWebpackPlugin({
inject: true,
scriptLoading: 'blocking',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
path: path.resolve(`./dist/${platform}/`),
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
path: path.resolve(`./dist/${platform}/`),
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
path: path.resolve(`./dist/${platform}/`),
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
library: 'hippyVueBase',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = {
// publicPath: 'https://xxx/hippy/hippyVueDemo/',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
library: 'hippyVueBase',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = {
// publicPath: 'https://xxx/hippy/hippyVueDemo/',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
library: 'hippyVueBase',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
// publicPath: 'https://xxx/hippy/hippyVueNextDemo/',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
library: 'hippyVueBase',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
// publicPath: 'https://xxx/hippy/hippyVueNextDemo/',
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ const WEB_SOCKET_MODULE_NAME = 'websocket';
// native event name for websocket
const WEB_SOCKET_NATIVE_EVENT = 'hippyWebsocketEvents';

// whether the websocket event listener has been bound
let isBindWebsocketEvent = false;

/**
* determine whether it is a legitimate websocket event
*
Expand Down Expand Up @@ -116,11 +113,7 @@ class WebSocket {
...extrasHeaders,
};

if (!isBindWebsocketEvent) {
// The bus is global, if it is multi-instance, there may be problems, to be verified fixme
isBindWebsocketEvent = true;
EventBus.$on(WEB_SOCKET_NATIVE_EVENT, this.onWebSocketEvent);
}
EventBus.$on(WEB_SOCKET_NATIVE_EVENT, this.onWebSocketEvent);

if (!url) {
throw new TypeError('Invalid WebSocket url');
Expand Down
Loading