Webpack无法parsing文件或dic

MYAPP:

| –src

| –index.js

| –content.js

| —webpack.config.js

index.js:

const React = require('react'); const ReactDom = require('react-dom'); const View = require('./content'); ReactDom.render(<View/>, document.body); 

content.js:

 const React = require('react'); class view extends React.Component { render() { return <p> Content </p> } } module.exports = View; 

webpack.config.js

 module.exports = { entry: './src/*', output: { path: path.join(__dirname, '/build'), filename: '[name].bundle.js' }, resolve: { extensions: ['', '.js', '.jsx'] }, module: { loaders: [{ test: /\.js|jsx$/, loader: ['jsx-loader?harmony'], exclude: /node_modules/ }] }, plugins: [commonsPlugin] } 

问题:

webpack –display-error-details

散列:c47fe037926d0dc83af7

版本:webpack 1.13.0

时间:62ms

 Asset Size Chunks Chunk Names 

common.js 191字节0 [发射] common.js

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' ./src/* in /Users/xx/WebstormProjects/jianwenji-react resolve file /Users/xx/WebstormProjects/jianwenji-react/src/* doesn't exist /Users/xx/WebstormProjects/jianwenji-react/src/*.js doesn't exist /Users/xx/WebstormProjects/jianwenji-react/src/*.jsx doesn't existparsing目录/Users/xx/WebstormProjects/jianwenji-react/src/* doesn't exist (directory default file) /Users/xx/WebstormProjects/jianwenji-react/src/*/package.json doesn't exist (directory description file)

为什么webpack无法find该文件?

       

网上收集的解决方案 "Webpack无法parsing文件或dic"