Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

How it functions, the features it has, and how to set up a realistic build specific to your environment.

Notifications You must be signed in to change notification settings

lydiali9/Webpack

Open more actions menu

Repository files navigation

Webpack

Step 1

npm install webpack -g

Step 2

webpack ./app.js bundle.js

Step 3

Open index.html in the browser

Step 4

add the file of webpack.config.js as following

module.exports = {
    entry: "./app.js",
    output: {
        filename: "bundle.js"
    }
}

Step 5

webpack --watch

To show the resule as above command, we can write code as following

module.exports = {
    entry: "./app.js",
    output: {
        filename: "bundle.js"
    },
    watch: true
}

Step 6

npm install webpack-dev-server -g
webpack-dev-server
  • Open URL http://localhost:8080/webpack-dev-server/], http://localhost:8080/ or http://localhost:8080/index.html or http://localhost:8080/webpack-dev-server/index.html in the browser.

Step 7

npm install babel-core babel-loader babel-preset-es2015 jshint jshint-loader node-libs-browser --save-dev

Step 8

npm install strip-loader --save-dev | npm install http-server -g
webpack-dev-server -d

As above command, You can use the key of debugger to debug.

About

How it functions, the features it has, and how to set up a realistic build specific to your environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.