Creating a JSON file as part of the Webpack build process

I am currently utilizing Webpack to compile my assets for a Chrome Extension. Typically, within the /dist directory, there would be various JS files, HTML files, and the essential manifest.json.

In the past, I had this file generated elsewhere and then utilized the 'copy-webpack-plugin' to copy it over to the /dist folder, similar to the method shown here:

https://i.sstatic.net/C6aQ8.jpg

However, I now find myself in need of dynamically generating the manifest.json. This requires making an AJAX request to fetch necessary data for the manifest.json, creating the file, and then placing it within the /dist directory.

While I have experience with Node.js and know how to obtain data through AJAX, bridging this Node.js application with my existing Webpack build process is where I am encountering uncertainty. Is a plugin necessary for this task?

Your assistance on resolving this matter will be greatly appreciated. The version of Webpack that I am using is "webpack": "^3.0.0".

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Automating Image Downloads with Puppeteer by Adding Authentication Query String to Image URL

Attempting to save images stored in a web-space account can be challenging. Accessing the private space with credentials and retrieving the image link using Puppeteer works smoothly. However, when the src attribute of the image includes additional authenti ...

Limiting the quantity in SimpleCart (js)

Currently, I am working on a WordPress website where I am using simpleCart(js) to add a shopping cart feature. I sell unique articles and do not require users to add more than one article to their cart. My main concern is how to prevent users from adding ...

Change the boxShadow and background properties of the material-ui Paper component

I am currently referencing their documentation found at this link in order to customize default Paper component properties. Below is the code snippet I have: import { styled } from '@mui/material/styles'; import { Modal, Button, TextField, Grid, ...

Adjust the width of a div element automatically using CSS

I have a dropdown bar with various options that I want to display inline while ensuring they can scale to occupy the entire width of the div, allowing for multiple options per row. Below is a screenshot showing my current progress: https://i.sstatic.net/3 ...

I'm still undecided on what script I should use

I am striving to achieve a specific outcome, which can be found at this link http://farm8.staticflickr.com/7291/11250276724_fc1f751dc0_o.png. This image represents the desired end result. Regrettably, I am uncertain of the script required to accomplish t ...

The jQuery .html() function is only functional in Internet Explorer when the Developer Tools are visible on the screen

On a particular page, users have the ability to add, edit, and delete items. This functionality is made possible through a series of Ajax calls that communicate with server-side code to update data on the backend. Once the data is successfully updated, the ...

Dynamic page transfer with notification

I'm currently exploring the implementation of an Ajax call in my Laravel project. I am specifically seeking a method to display success or error messages after the Ajax operation is successfully executed and redirects the page. In Laravel's cont ...

What is the best way to incorporate a year select feature in react-dates?

Swiping through months on react-dates until reaching the correct year can be frustrating. Would it be feasible to incorporate a selection option for both the year and month? ...

When using Vue.js, the class binding feature may not function properly if it is referencing another data property that has variants

I am currently developing a basic TODO application. Within my index.html file, I have a main div with the id #app. Inside this div, there is another div with the class .todobox where I intend to display different tasks stored in my main.js file. Each task ...

When a user clicks on a specific element's id, the image will rotate accordingly

When the elements in ul are clicked, the image rotates. The default position of the image is already rotated by a certain number of degrees, and on each click, it rotates to the desired value. This was achieved using the following code: $("#objRotates"). ...

I am having trouble figuring out the issue with the state and how to properly implement it in Typescript

I am having difficulties sending emails using Nodemailer, TypeScript, and NextJS. The contact.tsx file within the state component is causing errors when using setform. As a beginner in TypeScript, I have been unable to find a solution to this issue. Any he ...

The Ajax request retrieves the whole webpage instead of only the expected echo result

When I make an ajax call to a .php page to query the database for a numerical value, the entire HTML file is returned instead of just the number I need. Here is my ajax script: <script type="text/javascript"> $(document).ready(function() { $("# ...

Utilize UI-Router $stateProvider in Angular run block for Promise Resolution

UI-Router has different capabilities compared to Angular's ngRoute. It not only supports all the features of ngRoute but also provides additional functionalities. I am transitioning my Angular application from ngRoute to UI-Router. However, I'm ...

What is the best way to configure redux-sagas and organize file hierarchy?

After learning how to install JWT and apply it to my React Native project, I realized that without proper state management, I had to pass the JWT token fetched from the login authentication as props down multiple levels, which became quite cumbersome. This ...

Enhancing TypeScript Types with a custom method within an Angular 2 context

I am working on an Angular 2 project using the CLI. Currently, I am trying to add a custom method to the String type as shown below. interface String { customMethod(): number; } String.prototype.customMethod = function() { return 0; } Despite my ...

Can dynamic variables be incorporated within a const?

Could dynamic variables be used in the code below? const [viewport, setViewport] = useState ({ latitude:-8.683895, longitude:115.152307, width:800, height:440, zoom:16 }); I want the latitude and longitude to be flexible, like this: co ...

The image fails to display when the Image tag in next.js is used

I have a picture in the public/img folder. I am trying to display it using the built-in <Image/> tag in next.js. This is the code I've written: <Image onClick={hideModal} alt="close_button" ...

I am running multi-statement queries, however, I am facing difficulty in retrieving the results for each individual query

const searchOptions = { query: ` SELECT * from ENVIRONMENTAL__WASTE where ROWID = '1'; SELECT * from ENVIRONMENTAL__WASTE where ROWID = '2'; `, location: 'EU', }; const [customJob] = await bigquery. ...

Issues arise with the functionality of Datatables when attempting to implement a

I am trying to sort the "Date Created" column in my table in descending order of the latest date. I found a forum that suggested using the datetime datatable sorting plugin, but it didn't work as expected. Can someone help me solve this issue? Below a ...

The type {properties .....} is incompatible with the type ActionReducer<AdminState, Action> in Angular 12 using NGRX

Implementing NGRX library for redux to organize the state of the application in a structured way: export interface ApplicationState { adminState: AdminState } export interface AdminState { adminProductCategory: ProductCategoryState; adminProdu ...