我正在尝试获取在我的webpack配置中支持的*.scss文件,但当我运行webpack的build命令时,我一直收到以下错误:
ERROR in ./~/css-loader!./~/sass-loader!./app/styles.scss
Module build failed: TypeError: Cannot read property 'sections' of null
at new SourceMapConsumer (/Users/sean/Development/playground/webpack.sass.test/node_modules/css-l
我已经和webpack争了一天多了,为了给我通过ExtractTextPlugin加载的scss文件建立源图。
每次我收到错误:
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.relative (path.js:538:5)
at Object.onRender (C:\Git\app\node_modules\sass-loader\index.js:282:42)
at Object.<anonymous> (
我在这些设置中没有得到任何前缀。Cssnano和write to style.css工作正常,但是没有从我的sass添加前缀到css。
我刚开始接触webpack,所以可能我就是不明白。
配置:
var development = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
var path = require('path');
var precss = require('precss');
var ExtractTe
我正在讨论这个问题,在Cloud9 (Linux)上构建我的代码
http://localhost:8080/webpack-dev-server/
> webpack result is served from /
> content is served from ./
> 404s will fallback to /index.html
> Hash: 126cd080ff3d14fea7af
> Version: webpack 2.4.1
>
目前,我的webpack脚本构建中有两个文件,script.js和如果我在主script.js文件上创建react组件,它就会翻译ok。如果在contact-menu.js中创建并尝试导出导入,则会出现以下错误:
> ERROR in ./babel/contact-menu.js Module parse failed:
> /Applications/MAMP/htdocs/mcdonalds excavation/themes/mcdonalds/babel/contact-menu.js
> Unexpected token (7:3) You may need an