Skip to content

Commit

Permalink
feat: remove load-script
Browse files Browse the repository at this point in the history
  • Loading branch information
ihtml5 committed Sep 6, 2021
1 parent aab7624 commit 9e915a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 3 additions & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ module.exports = function(webpackEnv) {
output: {
ecma: 5,
comments: false,
preamble: `// v${pkg.version} ${new Date()} by Mdebug Team. Released under the MIT License.`,
preamble: `// v${
pkg.version
} ${new Date()} by Mdebug Team. Released under the MIT License.`,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
Expand Down
4 changes: 2 additions & 2 deletions docs/index.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"jest-environment-jsdom-fourteen": "0.1.0",
"jest-resolve": "24.7.1",
"jest-watch-typeahead": "0.3.0",
"load-script": "^1.0.0",
"loader-utils": "^1.1.0",
"mini-css-extract-plugin": "0.5.0",
"object-assign": "4.1.1",
Expand All @@ -60,9 +59,9 @@
"qs": "^6.9.4",
"raf": "3.4.0",
"react": "^17.0.2",
"react-dev-utils": "^9.0.1",
"react-devtools-inline": "4.0.5",
"react-dom": "^17.0.2",
"react-devtools-inline": "4.0.5",
"react-dev-utils": "^9.0.1",
"react-draggable": "^4.4.3",
"react-inspector": "^2.3.0",
"react-redux": "^5.0.7",
Expand Down
3 changes: 0 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ import { init as polyfillInit } from './polyfill';
import './index.css';
import store from './store';

const loadScript = require('load-script');
const { on, trigger: emit } = emitter;

let ready = false;
const init = (options = {}) => {
if (!ready) {
loadScript('https://unpkg.com/browse/[email protected]/dist/frontend.js');
loadScript('https://unpkg.com/browse/[email protected]/dist/backend.js');
// polyfill fetch console etc
polyfillInit();
// 创建mdebug节点
Expand Down

0 comments on commit 9e915a5

Please sign in to comment.