मैं index.html में एक चर कि इस तरह दिखता है बदलने के लिए कोशिश कर रहा हूँ में स्ट्रिंग-बदलें-लोडर के साथ एचटीएमएल-webpack-प्लगइन:उपयोग webpack
{
test: /index\.html$/,
loader: 'string-replace',
query: {
search: '$variable',
replace: 'stuff to inject',
},
}
loaders
सरणी में, और उसके बाद plugins
में:
new HtmlWebpackPlugin({
template: conf.path.src('src/index.html'),
inject: true,
})
में
लेकिन इस सेटिंग परिणाम:
ERROR in ./~/html-webpack-plugin/lib/loader.js!./src/index.html Module parse failed (...) Unexpected token (1:0) You may need an appropriate loader to handle this file type.
तुम क्या इस कारण हो सकता है या मैं यह कैसे डीबग कर सकते हैं किसी भी विचार है?
डीबगिंग के लिए मैं [लोहे-नोड] (https://github.com/sa/iron-node) का उपयोग कर रहा हूं जो नोड मॉड्यूल – jantimon