Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Easily generates a typical Webpack configuration.

License

Notifications You must be signed in to change notification settings

CharlesStover/configure-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

configureWebpack

configureWebpack is a Webpack configuration helper utility that automatically generates common Webpack configurations for NPM modules, including image, SASS, and TypeScript support.

Use

// webpack.config.js
const configureWebpack = require('configure-webpack');
module.exports = configureWebpack({ sass: true, typescript: true });

Options

css

If you are using vanilla CSS files (not SASS) in your package, set the css property to true.

sass

If you are using SASS files in your package, set the sass property to true.

typescript

If you are using TypeScript in your package, set the typescript property to true.

TypeScript

To add images to your TypeScript project, create the following files:

// src/types/images.d.ts
declare module '*.gif' {
  const _: string;
  export default _;
}

declare module '*.jpg' {
  const _: string;
  export default _;
}

declare module '*.png' {
  const _: string;
  export default _;
}

Releases

No releases published

Packages