chat-bubble
with Yarn and WebPackThis readme is based on this guide (no relation).
Itβs presumed that you have Yarn installed on your system. NPM will work too, but youβll need to switch the commands. This guide does not include versioning (like GitHub) setup which you should probably have as well.
yarn init
in your project directory. You can leave all fields blank.yarn add webpack webpack-dev-server babel-core babel-loader babel-preset-es2015 --save-dev
webpack.config.js
in the root of your project directory with the following code:
module.exports = {
entry: './app/main.js',
output: {
filename: 'bundle.js'
},
module: {
loaders: [
{
loader: 'babel-loader',
test: /\.js$/,
exclude: /node_modules/
}
]
},
devServer: {
port: 3000
},
devtool: 'inline-source-map'
};
index.html
inside the root of your project directory:
```html
<!DOCTYPE html>```
yarn add chat-bubble
and create /app
direcotry with main.js
that has the sample code from README.md.Now you can run yarn webpack-dev-server
and open http://localhost:3000 in your browser to test your project!