未知的插件dev-expression

时间:2015-11-10 18:55:36

标签: reactjs webpack react-router

我在我的项目中使用webpack + react。开始时没有显示错误。但是在更改文件jsx之后我得到了这个错误:Unknown plugin dev-expression。这是我的文件配置:

/* webpack.config.js */

var commonLoaders = [
        {test: /.*\.json$/, loader: 'json'},
        {test: /.*\.md$/, loader: 'file'},
        {test: /\.jsx?$/, loaders: ['babel-loader'], exclude: /node_modules/},
        {test: /.*\.(gif|png|jpg)$/, loaders: ['file?hash=sha512&digest=hex&size=16&name=[hash].[ext]', 'image-webpack-loader?optimizationLevel=7&interlaced=false']},
        {test: /.*\.(eot|woff|ttf|svg)/, loader: 'file?hash=sha512&digest=hex&size=16&name=cd [hash].[ext]'}
    ];

    module.exports = {
        entry: './index.jsx',

        output: {
            filename: './dist/bundle.js'
        },

        resolve: {
            modulesDirectories: ['node_modules'],
            extensions: ['', '.js', '.jsx', '.css']
        },

        module: {
            loaders: commonLoaders.concat([{test: /\.styl$/}])
        }
    };

/* package.json */

{
    "author": "Jack Callister",
    "license": "ISC",
    "dependencies": {
        "font-awesome": "^4.4.0",
        "material-ui": "^0.13.2",
        "react": "^0.14.2",
        "react-dom": "^0.14.2"
    },
    "devDependencies": {
        "babel-core": "^5.8.22",
        "babel-loader": "^5.3.2",
        "webpack": "^1.11.0"
    },
    "scripts": {
        "start": "npm run webpack & npm run serve",
        "webpack": "node_modules/.bin/webpack -w",
        "serve": "python -m SimpleHTTPServer"
    }
}

我在stackoverflow中看到了其他相似的问题,但不适合我

什么问题?

错误:

  错误在./~/material-ui/lib/index.js模块构建失败:   ReferenceError:未知插件“dev-expression”       在PluginManager.subnormaliseString(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace   的NodeJS /反应-的WebPack-样板主/ node_modules /巴别核/ LIB /转化/文件/插件-manager.js:147:13)       在PluginManager.add(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace   的NodeJS /反应-的WebPack-样板主/ node_modules /巴别核/ LIB /转化/文件/插件-manager.js:190:40)       在File.buildTransformers(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace)   的NodeJS /反应-的WebPack-样板主/ node_modules /巴别核/ LIB /转化/文件/ index.js:237:21)       在新文件(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace nodeJs / react-webpack-boilerplate-master / node_modules / babel-core / lib / transformation / file / index.js:139:10)       在Pipeline.transform(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace   的NodeJS /反应-的WebPack-样板主/ node_modules /巴别核/ LIB /转化/ pipeline.js:164:16)       在transpile(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace nodeJs / react-webpack-boilerplate-master / node_modules / babel-loader / index.js:12:22)       at Object.module.exports(/ Volumes / Ficheiro / Ambiente Desenvolvimento / Workspace   的NodeJS /反应-的WebPack-样板主/ node_modules /巴别装载机/ index.js:69:12)   @ ./index.jsx 5:17-39

0 个答案:

没有答案