Why not suggest a custom webpack configuration?
StephenCarboni opened this issue · 2 comments
StephenCarboni commented
According to the docs, one should be able to just do this:
// my-custom.webpack.config.js
const webpackConfig = require("./webpack.config");
const NativeScriptHTTPPlugin = require("@klippa/nativescript-http/webpack");
module.exports = (env) => {
const config = webpackConfig(env);
config.plugins.push(new NativeScriptHTTPPlugin());
return config;
};
And in nativescript.config.ts
, set webpackConfigPath
to "./my-custom.webpack.config.js"
No more hassling with the stock webpack config anymore.
jerbob92 commented
That's cool, didn't know that was possible :) I'll add it to the docs soon for the versions that support it.
jerbob92 commented
Added this to the readme, thanks!