Webpack DefinePlugin from async function

Viewed 1094

I'd like to define some constants that are returned from an asynchronous resource. Is there anyway to do this in Webpack?

/* webpack.config.js */
module.exports = {
    ...,
    plugins: [
        new webpack.DefinePlugin({
            someVar: /* RETURN VARIABLE FROM ASYNC FUNCTION */
        })
    ]
}
1 Answers
Related