a development bundle that facilitates debugging vs. The purpose is to modify the bundle being built (e.g. If not, then you need another solution where the process that serves your bundle to the client will pass in the required values) If yes, then DefinePlugin can help you with that. An easy way to distinguish these is to ask yourself:ĭo I need to know the actual value of the variable before the bundle is built? You may pass in a computed value inside but the value that ends up inside the bundle will be a fixed value determined before the application is ever run. it is carried out when the bundle is built, as opposed to being evaluated when the resulting application is run ( dynamic) in node or the browser. "babel-plugin-transform-object-rest-spread": "^6.26.0 ",Īs many people have pointed out, the substitution is a compile-time operation ( static), i.e. "babel-plugin-transform-decorators-legacy": "^1.3.4 ", Const webpack = require ( 'webpack' ) const path = require ( 'path' ) module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |