klippa-app/nativescript-http

Why not suggest a custom webpack configuration?

StephenCarboni opened this issue · 2 comments

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.

That's cool, didn't know that was possible :) I'll add it to the docs soon for the versions that support it.

Added this to the readme, thanks!