Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

waya-webpack-dev

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waya-webpack-dev

webpack dev tools for waya

latest
npmnpm
Version
0.0.5
Version published
Weekly downloads
2
-88.24%
Maintainers
1
Weekly downloads
 
Created
Source

Default

const DEFAULT_EXTENSIONS

const DEFAULT_EXTENSIONS: string[]

default file extensions for webpack resolver, default to:

  • js, mjs
  • ts, tsx
  • json

function createDefaultConfig

function createDefaultConfig(
  options: DefaultConfigOptions
): webpack.Configuration

create default config for dev mode. includes:

  • set mode to development
  • set context to project root
  • set @ alias for project root
  • set ts / tsx for extension free resolve
  • set devtool to inline-source-map for sourcemap debug
  • append modulesContext for modules search path
  • add webpack.HotModuleReplacementPlugin plugin to enable HMR feature
  • set output.publicPath to / for history fallback.

interface DefaultConfigOptions

interface DefaultConfigOptions {
  context: string
  name?: string
  modulesContext?: string
}
  • name was the compiler name, default to app

Script

function createScriptConfig

function createScriptConfig(): webpack.Configuration

create script config for dev mode, use ts-loader only.

const DEFAULT_IMAGE_EXTENSIONS

const DEFAULT_IMAGE_EXTENSIONS: string[]

image extensions for resolver. default to:

  • jpg, jpeg
  • png
  • gif
  • webp
  • svg

function createImageLoaderUse

function createImageLoaderUse(): webpack.RuleSetUse

just apply url-loader for load image resources.

function createImageConfig

function createImageConfig(options: ImageConfigOptions): webpack.Configuration

setup image loader rules.

interface ImageConfigOptions

interface ImageConfigOptions {
  context: string
}
  • context - image resources directory, only can load image file under this context.

Icon

function createIconConfig

function createIconConfig(options: IconConfigOptions): webpack.Configuration

create icon config. icon was set of svg files.

interface IconConfigOptions

interface IconConfigOptions {
  context: string
}
  • context - svg sources directory, only can load svg file under this context directory.

I18n

function createI18nConfig

function createI18nConfig(options: I18nConfigOptions): webpack.Configuration

create i18n config. locales file was set of yaml files.

interface I18nConfigOptions

interface I18nConfigOptions {
  context: string
}
  • context - i18n locales directory, only can load locales file under the context directory.

FAQs

Package last updated on 23 Oct 2019

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