मैं webpack एचटीएमएल का उपयोग कर रहा graphiql.ejs से html पृष्ठ उत्पन्न करने के लिए प्लगइन नहीं पैदा कर रहा है, लेकिन यह html पृष्ठ नहीं पैदा कर रहा है जब मैं npm start
Webpack एचटीएमएल प्लगइन एचटीएमएल
webpack.config.js
चला रहा हूँvar HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
plugins: [
new HtmlWebpackPlugin({
filename: "public/graphql/index.html", // Write the file to <public-path>/graphql/index.html
inject: false, // Do not inject any of your project assets into the template
GRAPHQL_VERSION: packageJSON.dependencies.graphql.replace(/[^0-9.]/g, ""), // Get the graphql version from my package.json
template: "graphiql.ejs" // path to template
})
]
};
मैं/public/graphql निर्देशिका के अंदर index.html उत्पन्न करना चाहता हूं। क्या कोई जानता है कि मुझसे क्या गलती हो रही है ? क्या वेबपैक चलाने के लिए कोई अन्य कमांड है?
आप इसे 'plugins' सरणी में डाल दिया और इसे निर्यात करने की जरूरत है https://webpack.github.io/docs/using: यह स्वचालित रूप से
start
स्क्रिप्ट जब आप ऐसा करेंगेnpm start
(more details) से पहले निष्पादित किया जाएगा -plugins.html – serge1peshcoff@ serge1peshcoff मैंने https://pastebin.com/1NgiM3kY किया लेकिन फिर भी यह –
उत्पन्न नहीं कर रहा है क्या आपकी 'npm start' script' webpack.config.js' फ़ाइल चलाती है? – Jehy