「__webpack_require __(...)は関数ではありません」というエラーを生成しない:なぜExtractTextPlugin.extract私はSASSファイルを仮定するためにかなり標準的なWebPACKのルールがどうあるべきか持って
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
minimize: isProduction,
sourceMap: true,
importLoaders: 1
},
},
{
loader: 'resolve-url-loader',
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: !!isProduction,
config: {
path: './postcss.config.js'
}
}
},
],
})
},
しかし、これは生産すると思われますエラー:
Module build failed: TypeError: __webpack_require__(...) is not a function
at Object.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/css-loader/index.js??ref--2-2!/Users/wichert/CurveTips/ws/display/node_modules/resolve-url-loader/index.js!/Users/wichert/CurveTips/ws/display/node_modules/sass-loader/lib/loader.js??ref--2-4!/Users/wichert/CurveTips/ws/display/node_modules/postcss-loader/lib/index.js??ref--2-5!/Users/wichert/CurveTips/ws/display/packages/display-site/src/assets/styles/curvetips.scss:102:50)
at __webpack_require__ (/Users/wichert/CurveTips/ws/display/node_modules/css-loader/index.js??ref--2-2!/Users/wichert/CurveTips/ws/display/node_modules/resolve-url-loader/index.js!/Users/wichert/CurveTips/ws/display/node_modules/sass-loader/lib/loader.js??ref--2-4!/Users/wichert/CurveTips/ws/display/node_modules/postcss-loader/lib/index.js??ref--2-5!/Users/wichert/CurveTips/ws/display/packages/display-site/src/assets/styles/curvetips.scss:22:30)
at module.exports.module.exports (/Users/wichert/CurveTips/ws/display/node_modules/css-loader/index.js??ref--2-2!/Users/wichert/CurveTips/ws/display/node_modules/resolve-url-loader/index.js!/Users/wichert/CurveTips/ws/display/node_modules/sass-loader/lib/loader.js??ref--2-4!/Users/wichert/CurveTips/ws/display/node_modules/postcss-loader/lib/index.js??ref--2-5!/Users/wichert/CurveTips/ws/display/packages/display-site/src/assets/styles/curvetips.scss:65:18)
at Object.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/css-loader/index.js??ref--2-2!/Users/wichert/CurveTips/ws/display/node_modules/resolve-url-loader/index.js!/Users/wichert/CurveTips/ws/display/node_modules/sass-loader/lib/loader.js??ref--2-4!/Users/wichert/CurveTips/ws/display/node_modules/postcss-loader/lib/index.js??ref--2-5!/Users/wichert/CurveTips/ws/display/packages/display-site/src/assets/styles/curvetips.scss:68:10)
at Module._compile (module.js:660:30)
at Object.exec (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/NormalModule.js:129:12)
at /Users/wichert/CurveTips/ws/display/node_modules/extract-text-webpack-plugin/dist/loader.js:131:26
at compile (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/Compiler.js:300:11)
at applyPluginsAsync.err (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/Compiler.js:510:14)
at next (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:202:11)
at Compiler.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/extract-text-webpack-plugin/dist/loader.js:112:7)
at next (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:204:14)
at Compiler.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/awesome-typescript-loader/src/instance.ts:442:13)
at next (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:204:14)
at Compiler.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/CachePlugin.js:78:5)
at Compiler.applyPluginsAsyncSeries (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:206:13)
at compilation.seal.err (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/Compiler.js:507:11)
at Compilation.applyPluginsAsyncSeries (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:195:46)
at self.applyPluginsAsync.err (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/Compilation.js:680:19)
at Compilation.applyPluginsAsyncSeries (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:195:46)
at self.applyPluginsAsync.err (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/Compilation.js:671:11)
at next (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:202:11)
at Compilation.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/uglifyjs-webpack-plugin/dist/index.js:244:6)
at next (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:204:14)
at Compilation.compilation.plugin (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/BannerPlugin.js:67:5)
at next (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:204:14)
at Compilation.<anonymous> (/Users/wichert/CurveTips/ws/display/node_modules/uglifyjs-webpack-plugin/dist/index.js:244:6)
at Compilation.applyPluginsAsyncSeries (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:206:13)
at self.applyPluginsAsync.err (/Users/wichert/CurveTips/ws/display/node_modules/webpack/lib/Compilation.js:666:10)
at Compilation.applyPluginsAsyncSeries (/Users/wichert/CurveTips/ws/display/node_modules/tapable/lib/Tapable.js:195:46)
ExtractTextPlugin.extractコールの取り外しとローダーの私のリストを使用して、直接私がExtractTextPlugin.extractで行方不明です何かがある疑いがある可能おり、正常に動作します。