How to use the @nestjs/ng-universal.WebpackConfigFactory function in @nestjs/ng-universal

To help you get started, we’ve selected a few @nestjs/ng-universal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github servrox / nx-ng-nest-universal / apps / nest-test-app / webpack.server.config.js View on Github external
const path = require('path');
const webpack = require('webpack');
const WebpackConfigFactory = require('@nestjs/ng-universal')
  .WebpackConfigFactory;

const config = WebpackConfigFactory.create(webpack, {
  // Nest server for SSR
  server: './apps/nest-test-app/src/main.ts'
});
config.output = {
  // Puts the output at the root of the dist folder
  path: path.join(__dirname, '../../dist/apps/ng-test-app-server'),
  filename: '[name].js'
};
config.plugins = [
  new webpack.ContextReplacementPlugin(
    // fixes WARNING Critical dependency: the request of a dependency is an expression
    /(.+)?angular(\\|\/)core(.+)?/,
    path.join(__dirname, 'apps/ng-test-app/src'), // location of your src
github nestjs / ng-universal / schematics / install / files / root / webpack.server.config.js View on Github external
const webpack = require('webpack');
const WebpackConfigFactory = require('@nestjs/ng-universal')
  .WebpackConfigFactory;

module.exports = WebpackConfigFactory.create(webpack, {
  // Nest server for SSR
  server: './server/main.ts'
});

@nestjs/ng-universal

Nest - modern, fast, powerful node.js web framework (@ng-universal)

MIT
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis

Similar packages