如上圖所示,我在Deskmark目錄下有index.jsx。import時(shí),必須寫全部路徑(即:import Deskmark from './components/Deskmark/index.jsx')。否則會(huì)webpack打包時(shí)會(huì)報(bào) Module not found請(qǐng)問有什么方法可以讓webpack自動(dòng)找到文件夾下的index.jsx,或者達(dá)到相似的效果,下面時(shí)我的webpack配置
webpack 找不到import文件夾下的index.jsx
Heymanfk
2018-01-22 22:50:32