Configure Linters in main Branch.
Create Three Files inside src folder that must be inside repo folder;
- index.html
- style.css
- index.js
Create an webpack.config.js file inside repo folder.
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
}),
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
};
npm install webpack webpack-cli --save-dev
npm install --save-dev style-loader css-loader
npm install --save-dev html-webpack-plugin
npm install --save-dev webpack-dev-server
Update scripts part of package.json with these lines!
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack serve --open",
"build": "webpack"
npm run build
npm start
Clone this repository to your desired folder:
👤 Syeda Masuma Fatima
- GitHub: @MasumaJaffery
- Twitter: @MasumaJaffery
- LinkedIn: Masuma Jaffery
Give credit to everyone who inspired your codebase.
I would like to thank Microverse!
This project is MIT licensed.
NOTE: we recommend using the MIT license - you can set it up quickly by using templates available on GitHub. You can also use any other license if you wish.