Skip to content

Commit 6e62765

Browse files
committed
chore: fix entries
1 parent 4b19d35 commit 6e62765

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"main": "dist/index.js",
1616
"module": "dist/index.esm.js",
1717
"scripts": {
18-
"build": "rollup -c",
18+
"build": "rollup -c && cp -r ./src/entries ./dist/entries",
1919
"format": "prettier --write \"**/*.{js,json,md}\" \"*.{js,json,md}\"",
2020
"lint": "eslint .",
2121
"prepublishOnly": "yarn build",
File renamed without changes.
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* global __resourceQuery */
22

33
import querystring from 'querystring'
4-
import url from 'url'
54
import SockJS from 'sockjs-client'
65
import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'
76
import { reportBuildError, dismissBuildError } from 'react-error-overlay'
@@ -12,12 +11,11 @@ if (typeof __resourceQuery === 'string' && __resourceQuery) {
1211
}
1312

1413
const connection = new SockJS(
15-
url.format({
16-
protocol: window.location.protocol,
17-
hostname: sockOptions.sockHost || window.location.hostname,
18-
port: sockOptions.sockPort || window.location.port,
19-
pathname: sockOptions.sockPath || '/sockjs-node',
20-
}),
14+
`${window.location.protocol}//${
15+
sockOptions.sockHost || window.location.hostname
16+
}:${sockOptions.sockPort || window.location.port}${
17+
sockOptions.sockPath || '/sockjs-node'
18+
}`,
2119
)
2220

2321
connection.onmessage = function onmessage(e) {

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware'
1+
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware')
22

3-
const chunkPathBasic = require.resolve('./entry-basic')
4-
const chunkPathDevServer = require.resolve('./entry-devserver')
3+
const chunkPathBasic = require.resolve('./entries/basic')
4+
const chunkPathDevServer = require.resolve('./entries/devserver')
55

66
class ErrorOverlayPlugin {
77
apply(compiler) {

0 commit comments

Comments
 (0)