1

Inside webpack.config.js, i updated bundle.js name as following

output: { 
    path: path.resolve(__dirname, "../dist/"),
    publicPath: "auto",
    filename: "[name].[chunkhash].js",
},

And i am calling it from frontend as following but it's giving error because now bundle.js name has been changed.

<script src="../dist/bundle.js"></script>

How to call them properly?

1
  • the bundle filename is generated from transpilation , and the dist/index.html with the right include directive is generated from index.html. We can not reply to your question, if you don't provide more details about your project setup. Commented Feb 8, 2023 at 16:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.