Socket
Socket
Sign inDemoInstall

@appsemble/webpack-config

Package Overview
Dependencies
Maintainers
4
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsemble/webpack-config

NodeJS utilities used by Appsemble internally.


Version published
Maintainers
4
Created
Source

Appsemble Webpack Configuration

An opinionated reusable Webpack configuration for block development

npm GitLab CI Prettier

Table of Contents

Installation

npm install @appsemble/webpack-config

Usage

No setup is needed to use this configuration. @appsemble/cli will automatically fall back to this configuration if no webpack file has been specified in the .appsemblerc.yaml of the block and no webpack.config.js file exists.

This Webpack preset features:

TypeScript

In order to add support for static assets and CSS modules, use the following tsconfig.json options:

{
  "compilerOptions": {
    "types": ["@appsemble/webpack-config/types"]
  }
}

Manual Adjustments

Since a Webpack configuration is a function that returns a Webpack configuration, this preset can be overridden by simply calling it from a file named webpack.config.js in the block root and modifying the result.

import createConfig from '@appsemble/webpack-config';
import ImageMinimizerPlugin from 'image-minimizer-webpack-plugin';

export default function webpackConfig(blockConfig, options) {
  const config = createConfig(blockConfig, options);

  // Add a plugin for example
  config.plugins.push(new ImageMinimizerPlugin());

  // Or configure a fallback
  config.resolve.alias.fallback.fs = false;

  return config;
}

License

LGPL-3.0-only © Appsemble

Keywords

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc