How to use the terra-dev-site/config/webpack/webpack.config function in terra-dev-site

To help you get started, we’ve selected a few terra-dev-site 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 cerner / terra-core / webpack.config.js View on Github external
const mergedConfig = (env, argv) => (
  merge(defaultWebpackConfig(env, argv), coreConfig())
);
github cerner / terra-ui / webpack.config.js View on Github external
const webpackConfig = (env, argv) => {
  const config = defaultWebpackConfig(env, argv);

  const propsTable = path.resolve(path.join(process.cwd(), 'node_modules', 'terra-props-table'));
  const momentAlias = path.resolve(path.join(process.cwd(), 'node_modules', 'moment'));
  const intl = path.resolve(path.join(process.cwd(), 'node_modules', 'intl'));
  const terraMarkdown = path.resolve(path.join(process.cwd(), 'node_modules', 'terra-markdown'));
  const terraDatePicker = path.resolve(path.join(process.cwd(), 'node_modules', 'terra-date-picker'));
  const resizeObserver = path.resolve(path.join(process.cwd(), 'node_modules', 'resize-observer-polyfill'));
  const reactRouterDom = path.resolve(path.join(process.cwd(), 'node_modules', 'react-router-dom'));
  const babelRuntime = path.resolve(path.join(process.cwd(), 'node_modules', 'babel-runtime'));
  const terraButton = path.resolve(path.join(process.cwd(), 'node_modules', 'terra-button'));

  config.stats = 'normal';
  config.resolve.alias = {};
  config.resolve.alias['terra-props-table'] = propsTable;
  config.resolve.alias['terra-markdown'] = terraMarkdown;
  config.resolve.alias['terra-date-picker'] = terraDatePicker;

terra-dev-site

Dynamically builds a react-hash-routed site based on site configuration, navigation configuration and component configuration.

Apache-2.0
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis