発生している問題
以下の設定でバンドルしようとすると、エラーが発生してしまいます。
const merge = require("webpack-merge"); const common = require("./webpack.common.js"); module.exports = merge(common, { mode: "development", }); // 以下のコードではエラーが発生しませんでした。 // module.exports = merge(common);
× 「wds」: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration has an unknown property '0'. These properties are valid: object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtoo l?, entry?, externals?, infrastructureLogging?, loader?, mode?, module?, nam e?, node?, optimization?, output?, parallelism?, performance?, plugins?, pro file?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolv eLoader?, serve?, stats?, target?, watch?, watchOptions? } For typos: please correct them. For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration. Loaders should be updated to allow passing options via loader options i n module.rules. Until loaders are updated one can use the LoaderOptionsPlugin to pass t hese options to the loader: plugins: [ new webpack.LoaderOptionsPlugin({ // test: /.xxx$/, // may apply this only for some modules options: { 0: … } }) ]
あなたの回答
tips
プレビュー