text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```javascript console.log('No one likes me') ```
/content/code_sandbox/zh-cn/part1/example1/src/extraFile.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
9
```javascript var fetch = require('fetch') // fetch polyfill fetch('path_to_url ```
/content/code_sandbox/zh-cn/part1/example1/src/APIStuff.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
19
```javascript console.log('It works!') ```
/content/code_sandbox/zh-cn/part1/example3/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/zh-cn/part1/example3/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
98
```javascript console.log('It works!') ```
/content/code_sandbox/zh-cn/part1/example5/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ c...
/content/code_sandbox/zh-cn/part1/example5/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
140
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-cn/part1/example5/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-cn/part1/example5/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript var path = require('path') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' } } ```
/content/code_sandbox/zh-cn/part1/example2/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
52
```javascript console.log('It works!') ```
/content/code_sandbox/zh-cn/part1/example2/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/zh-cn/part1/example6/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
148
```javascript console.log('hello there my friends') ```
/content/code_sandbox/zh-cn/part1/example6/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
9
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/zh-cn/part1/example6/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-cn/part1/example6/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-cn/part1/example6/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```javascript console.log('It works!') ```
/content/code_sandbox/zh-cn/part1/example4/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```css ```
/content/code_sandbox/zh-cn/part1/example4/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
1
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/zh-cn/part1/example4/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
125
```html ```
/content/code_sandbox/zh-cn/part1/example4/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
1
```javascript /* eslint no-var: 0 */ var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], ou...
/content/code_sandbox/zh-TW/part2/example1/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
203
```javascript /* eslint no-var: 0 */ var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ ...
/content/code_sandbox/zh-TW/part2/example1/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
203
```javascript import Please from 'pleasejs' // use es6 module import require('./styles.css') // The page is now styled // Accept hot module reloading during development if (process.env.NODE_ENV !== 'production') { if (module.hot) { module.hot.accept() } } const div = document.getElementById('color') const but...
/content/code_sandbox/zh-TW/part2/example1/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
99
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-TW/part2/example1/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-TW/part2/example1/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') var ExtractTextPlugin = require("extract-text-webpack-plugin"); module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), ...
/content/code_sandbox/zh-TW/part1/css-extract/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
175
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/zh-TW/part1/css-extract/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript require('./styles.css') require('./changeColor.js') ```
/content/code_sandbox/zh-TW/part1/css-extract/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
12
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-TW/part1/css-extract/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```javascript var Please = require('pleasejs') var div = document.getElementById('color') var button = document.getElementById('button') function changeColor() { div.style.backgroundColor = Please.make_color() console.log('pls do work') } button.addEventListener('click', changeColor) ```
/content/code_sandbox/zh-TW/part1/css-extract/src/changeColor.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
56
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-TW/part1/css-extract/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/zh-TW/part1/html-reload/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript if (process.env.NODE_ENV !== 'production') { require('./index.html') } ```
/content/code_sandbox/zh-TW/part1/html-reload/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
19
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/zh-TW/part1/html-reload/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
197
```css h1 { color: rgb(114, 191, 190); } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: inline-block; height: 20px; background-color: rgb(123, 109, 198); color: rgb(255, 255, 255); padding: 10px 5px; border-radius: 4px; border-bottom: 2px solid rgb(1...
/content/code_sandbox/zh-TW/part1/html-reload/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
127
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-TW/part1/html-reload/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
57
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/zh-TW/part1/example7/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
148
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/zh-TW/part1/example7/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript // Accept hot module reloading if (module.hot) { module.hot.accept() } require('./styles.css') // The page is now styled var Please = require('pleasejs') var div = document.getElementById('color') var button = document.getElementById('button') function changeColor() { div.style.backgroundColor = Ple...
/content/code_sandbox/zh-TW/part1/example7/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
87
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-TW/part1/example7/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-TW/part1/example7/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript require('./styles.css') require('./UIStuff.js') require('./APIStuff.js') ```
/content/code_sandbox/zh-TW/part1/example1/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
18
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/zh-TW/part1/example1/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
125
```css body { background-color: rgb(200, 56, 97); } ```
/content/code_sandbox/zh-TW/part1/example1/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
18
```javascript var React = require('React') React.createClass({ // stuff }) ```
/content/code_sandbox/zh-TW/part1/example1/src/UIStuff.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
16
```javascript console.log('No one likes me') ```
/content/code_sandbox/zh-TW/part1/example1/src/extraFile.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
9
```javascript var fetch = require('fetch') // fetch polyfill fetch('path_to_url ```
/content/code_sandbox/zh-TW/part1/example1/src/APIStuff.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
19
```javascript console.log('It works!') ```
/content/code_sandbox/zh-TW/part1/example3/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/zh-TW/part1/example3/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
98
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ c...
/content/code_sandbox/zh-TW/part1/example5/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
140
```javascript console.log('It works!') ```
/content/code_sandbox/zh-TW/part1/example5/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-TW/part1/example5/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-TW/part1/example5/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript var path = require('path') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' } } ```
/content/code_sandbox/zh-TW/part1/example2/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
52
```javascript console.log('It works!') ```
/content/code_sandbox/zh-TW/part1/example2/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/zh-TW/part1/example6/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
148
```javascript console.log('hello there my friends') ```
/content/code_sandbox/zh-TW/part1/example6/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
9
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/zh-TW/part1/example6/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/zh-TW/part1/example6/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/zh-TW/part1/example6/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript console.log('It works!') ```
/content/code_sandbox/zh-TW/part1/example4/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```css ```
/content/code_sandbox/zh-TW/part1/example4/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
1
```html ```
/content/code_sandbox/zh-TW/part1/example4/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
1
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/zh-TW/part1/example4/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
125
```javascript /* eslint no-var: 0 */ var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ ...
/content/code_sandbox/part2/example1/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
203
```javascript import Please from 'pleasejs' // use es6 module import require('./styles.css') // The page is now styled // Accept hot module reloading during development if (process.env.NODE_ENV !== 'production') { if (module.hot) { module.hot.accept() } } const div = document.getElementById('color') const but...
/content/code_sandbox/part2/example1/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
99
```javascript /* eslint no-var: 0 */ var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], ou...
/content/code_sandbox/part2/example1/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
203
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/part2/example1/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/part2/example1/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/part1/css-extract/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript require('./styles.css') require('./changeColor.js') ```
/content/code_sandbox/part1/css-extract/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
12
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') var ExtractTextPlugin = require("extract-text-webpack-plugin"); module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), ...
/content/code_sandbox/part1/css-extract/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
175
```javascript var Please = require('pleasejs') var div = document.getElementById('color') var button = document.getElementById('button') function changeColor() { div.style.backgroundColor = Please.make_color() console.log('pls do work') } button.addEventListener('click', changeColor) ```
/content/code_sandbox/part1/css-extract/src/changeColor.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
56
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/part1/css-extract/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/part1/css-extract/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/part1/html-reload/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/part1/html-reload/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
197
```javascript if (process.env.NODE_ENV !== 'production') { require('./index.html') } ```
/content/code_sandbox/part1/html-reload/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
19
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/part1/html-reload/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
57
```css h1 { color: rgb(114, 191, 190); } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: inline-block; height: 20px; background-color: rgb(123, 109, 198); color: rgb(255, 255, 255); padding: 10px 5px; border-radius: 4px; border-bottom: 2px solid rgb(1...
/content/code_sandbox/part1/html-reload/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
127
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/part1/example7/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/part1/example7/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
148
```javascript // Accept hot module reloading if (module.hot) { module.hot.accept() } require('./styles.css') // The page is now styled var Please = require('pleasejs') var div = document.getElementById('color') var button = document.getElementById('button') function changeColor() { div.style.backgroundColor = Ple...
/content/code_sandbox/part1/example7/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
87
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/part1/example7/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/part1/example7/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript require('./styles.css') require('./UIStuff.js') require('./APIStuff.js') ```
/content/code_sandbox/part1/example1/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
18
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/part1/example1/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
125
```css body { background-color: rgb(200, 56, 97); } ```
/content/code_sandbox/part1/example1/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
18
```javascript var React = require('React') React.createClass({ // stuff }) ```
/content/code_sandbox/part1/example1/src/UIStuff.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
16
```javascript console.log('No one likes me') ```
/content/code_sandbox/part1/example1/src/extraFile.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
9
```javascript var fetch = require('fetch') // fetch polyfill fetch('path_to_url ```
/content/code_sandbox/part1/example1/src/APIStuff.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
19
```javascript console.log('It works!') ```
/content/code_sandbox/part1/example3/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```javascript var path = require('path') var webpack = require('webpack') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ compressor: { war...
/content/code_sandbox/part1/example3/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
98
```javascript console.log('It works!') ```
/content/code_sandbox/part1/example5/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
7
```css h1 { color: rgb(114, 191, 190); text-align: center; } #color { width: 300px; height: 300px; margin: 0 auto; } button { cursor: pointer; display: block; width: 100px; outline: 0; border: 0; margin: 20px auto; } ```
/content/code_sandbox/part1/example5/src/styles.css
css
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
89
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize.UglifyJsPlugin({ c...
/content/code_sandbox/part1/example5/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
140
```html <html> <head> <title>Webpack Tutorial</title> </head> <body> <h1>Very Website</h1> <section id="color"></section> <button id="button">Such Button</button> </body> </html> ```
/content/code_sandbox/part1/example5/src/index.html
html
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
58
```javascript var path = require('path') module.exports = { entry: ['./src/index'], // .js after index is optional output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' } } ```
/content/code_sandbox/part1/example2/webpack.config.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
52
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'source-map', entry: ['./src/index'], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, plugins: [ new webpack.optimize...
/content/code_sandbox/part1/example6/webpack.config.prod.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
148
```javascript var path = require('path') var webpack = require('webpack') var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-eval-source-map', entry: [ 'webpack-dev-server/client?path_to_url 'webpack/hot/dev-server', './src/index' ], output: { path: path.j...
/content/code_sandbox/part1/example6/webpack.config.dev.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
169
```javascript console.log('hello there my friends') ```
/content/code_sandbox/part1/example6/src/index.js
javascript
2016-02-03T19:46:42
2024-08-12T10:51:48
WebpackTutorial
AriaFallah/WebpackTutorial
2,231
9