This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #fff; | |
| background: linear-gradient(45deg, #fff, grey); | |
| min-height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log('Welcome from app.js'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "learn-webpack2", | |
| "version": "1.0.0", | |
| "description": "learn webpack2", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "webpack ./src/scripts/app.js ./dist/app.bundle.js" | |
| }, | |
| "author": "Bharat Tiwari", | |
| "license": "ISC" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| entry: "./src/scripts/app.js",//path relative to this file | |
| output: { | |
| filename: "./dist/app.bundle.js"//path relative to this file | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>My Awesome application</title> | |
| </head> | |
| <body> | |
| <h1>Hello World</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| module.exports = { | |
| entry: "./src/scripts/app.js", //relative to root of the application | |
| output: { | |
| filename: "./dist/app.bundle.js" //relative to root of the application | |
| }, | |
| plugins: [ | |
| new HtmlWebpackPlugin({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title><%= htmlWebpackPlugin.options.title %></title> | |
| </head> | |
| <body> | |
| <h1> <%= htmlWebpackPlugin.options.myPageHeader %> </h1> | |
| <h3>Welcome to the Awesome application</h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| ... | |
| plugins: [ | |
| new HtmlWebpackPlugin({ | |
| hash: true, | |
| title: 'My Awesome application', | |
| myPageHeader: 'Hello World', | |
| template: './src/index.html', | |
| filename: './dist/index.html' //relative to root of the application | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| module.exports = { | |
| entry: "./src/scripts/app.js", //relative to root of the application | |
| output: { | |
| filename: "./dist/app.bundle.js" //relative to root of the application | |
| }, | |
| watch:true, | |
| plugins: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| greetings: 'Hello from my-helper-module!!' | |
| }; |
OlderNewer