Closed hm496 closed 2 years ago
请教下,为什么 onGetWebpackConfig 不执行? 提示 WARN CONFIG No webpack config found.
"build-plugin-component": "^1.11.0", "build-scripts": "^1.3.0", "jest": "^26.4.2", "webpack": "^4.43.0", "webpack-dev-server": "^3.11.3"
// build.json 文件内容 { "externals": { "react": "var window.React", "react-dom": "var window.ReactDOM", }, "plugins": [ "build-plugin-component", "./build.plugin.js" ] } // build.plugin.js 文件内容 module.exports = ({ onGetWebpackConfig }) => { onGetWebpackConfig((config) => { // 这里为啥不执行? console.log('---------'); console.log('---------'); console.log('---------'); }); };
怎么解决的?
请教下,为什么 onGetWebpackConfig 不执行? 提示 WARN CONFIG No webpack config found.