webpack

v4.0.1arrow_drop_down
v4.0.1
v0.0.13
v0.0.12
v0.0.11
v0.0.10
v0.0.9
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
1,366
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
2 months ago
subject
Bit Webpack compiler. Compiles and bundles components using Webpack.
4 contributors
Like
Use webpack in your project ?
Copied
npm i @bit/bit.envs.bundlers.webpack
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
modified
chevron_left
chevron_right

Webpack bundler

A component compiler that bundles the component using webpack ^v4.0.1. Please note that while bundling components is possible, it is recommended to transpiling components

What is bundled?

The bundler bundles the component’s main file and test files. In case there are component files that are not in those files’ dependency trees, they won’t be bundled. Note that this is in accordance with webpack’s usual behavior, but not in accordance with the usual behavior of Bit compilers, which usually compile all the files.

How to use?

Import the environment.

bit import bit.envs/bundlers/webpack -c

Then build using bit build.

bit build

What’s inside

  • js/jsx compiling using the following babel presets babelPresetReact, babelPresetEs2015, stage0
  • [s]css support using style-loader and css-loader
  • mp4|webm|wav|mp3|m4a|aac|oga support using url-loader
  • svg support using svg-inline-loader

Reconfiguring this environment

In case the configuration presets in the webpack.config.js file of this component are not well suited to your needs, follow these steps to modify it.

Got any issues or questions?

Collaboration on this Bit environment happens in this repository. Please open an issue or submit pull request there.