setup the react on local machine
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './main.js',
output: {
path: path.join(__dirname, '/bundle'),
filename: 'index_bundle.js'
},
devServer: {
inline: true,
port: 8001
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
}
}
]
},
plugins:[
new HtmlWebpackPlugin({
template: './index.html'
})
]
}
Also in JavaScript:
- jquery delay to call function
- js var
- jquery set select value
- vowels consonants javascript
- slider plugin for angular
- get data attribute javascript
- regular expression |
- javascript call function every second
- factory function javascript
- slice() javascript
- remove commas and dollar sign from string js
- javascript timestamp to date
- splice method js
- js tolowercase
- replace innerhtml javascript by regex
- react native routes
- NullInjectorError: No provider for HttpHandler!
- javascript test for empty object
- js iterate object
- How to get row index and cellindex together in javascript
- .append js
- reactjs app change port
- map a square to a circle
- length of dict js