0
Webpackでモジュールをビルドするとエラーが発生します。私はこのエラーが何を意味するのかを示唆するための文書を見つけることができません。モジュールがロードされたLIBSのWebpackエラー:モジュールビルドに失敗しました:エラー:環境[オブジェクトオブジェクト]がサポートされていません
Webpack Error: Module build failed: Error: Environment [object Object] not supported
一つは、それに関連付けられたスタイルシートをそれぞれ有する反応させ成分とlib
ディレクトリを含みます。各スタイルシートには1つのエラーがあります。ここでは、フルのエラーのいずれかです。スタイルシートに関する
ERROR in ./~/css-loader?{"localIdentName":"[name]__[local]--[hash:base64:5]","minimize":true}!./~/postcss-loader!../some-lib/lib/plugins/importGalleryImages/components/ItemList/ItemList.css
Module build failed: Error: Environment [object Object] not supported
at module.exports (/Users/me/Documents/Personal/Code/Repos/project/webpack.server.config.js:94:9)
at /Users/me/Documents/Personal/Code/Repos/project/node_modules/postcss-load-config/index.js:58:50
@ ../some-lib/lib/plugins/importGalleryImages/components/ItemList/ItemList.css 4:14-185
@ ../some-lib/lib/plugins/importGalleryImages/components/ItemList/ItemList.js
@ ../some-lib/lib/plugins/importGalleryImages/components/Renderer/Renderer.js
@ ../some-lib/lib/plugins/importGalleryImages/config.js
@ ../some-lib/lib/index.js
@ ./app/js/server.jsgogh/lib/plugins/importGalleryImages/components/ItemList/ItemList.css 4:14-185
@ ../sb-van-gogh/lib/plugins/importGalleryImages/components/ItemList/ItemList.js
@ ../sb-van-gogh/lib/plugins/importGalleryImages/components/Renderer/Renderer.js
@ ../sb-van-gogh/lib/plugins/importGalleryImages/config.js
@ ../sb-van-gogh/lib/index.js
@ ./app/js/server.js
私のWebPACKの設定は次のとおりです。
{
module: {
rules: [
{
test: STYLES_REGEX,
include: includePaths,
exclude: globalPath,
// Extract CSS
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
// Note: that there is no need for styles-loader as we don't want to convert styles
// to JS
loader: [
{
loader: 'css-loader',
options: {
// Use CSS Modules
modules: useModules,
localIdentName: '[name]__[local]--[hash:base64:5]',
// Minimise output using cssnano.
// Note: An object can also be passed containing config options
minimize: true,
},
},
{
loader: 'postcss-loader',
},
],
}),
},
],
},
};