From ede382df9b2a76c55f21018f5131374215c0ec91 Mon Sep 17 00:00:00 2001 From: NK Date: Wed, 28 Sep 2022 17:58:13 +0800 Subject: [PATCH] feat: add EntryDependency in compiled webpack (#567) --- packages/bundles/webpack/bundle.js | 1 + packages/bundles/webpack/packages/EntryDependency.js | 1 + packages/ice/src/tasks/miniapp/webpack/plugins/MiniPlugin.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 packages/bundles/webpack/packages/EntryDependency.js diff --git a/packages/bundles/webpack/bundle.js b/packages/bundles/webpack/bundle.js index 08d7776f8..4b9bfbb84 100644 --- a/packages/bundles/webpack/bundle.js +++ b/packages/bundles/webpack/bundle.js @@ -12,6 +12,7 @@ module.exports = { FetchCompileWasmPlugin: require('webpack/lib/web/FetchCompileWasmPlugin'), StringXor: require('webpack/lib/util/StringXor'), NormalModule: require('webpack/lib/NormalModule'), + EntryDependency: require('webpack/lib/dependencies/EntryDependency'), sources: require('webpack').sources, webpack: require('webpack'), package: { diff --git a/packages/bundles/webpack/packages/EntryDependency.js b/packages/bundles/webpack/packages/EntryDependency.js new file mode 100644 index 000000000..f24365772 --- /dev/null +++ b/packages/bundles/webpack/packages/EntryDependency.js @@ -0,0 +1 @@ +module.exports = require('./bundle').EntryDependency; diff --git a/packages/ice/src/tasks/miniapp/webpack/plugins/MiniPlugin.ts b/packages/ice/src/tasks/miniapp/webpack/plugins/MiniPlugin.ts index 32e04c104..90f6a932a 100644 --- a/packages/ice/src/tasks/miniapp/webpack/plugins/MiniPlugin.ts +++ b/packages/ice/src/tasks/miniapp/webpack/plugins/MiniPlugin.ts @@ -8,7 +8,7 @@ import fs from 'fs-extra'; import { minify } from 'html-minifier'; import loaderUtils from '@ice/bundles/compiled/loader-utils/index.js'; import webpack from '@ice/bundles/compiled/webpack/index.js'; -import EntryDependency from 'webpack/lib/dependencies/EntryDependency.js'; +import EntryDependency from '@ice/bundles/compiled/webpack/EntryDependency.js'; import SingleEntryDependency from '../dependencies/SingleEntryDependency.js'; import { componentConfig } from '../template/component.js';