mern icon indicating copy to clipboard operation
mern copied to clipboard

Add htmllinter-webpack-plugin and html-webpack-plugin

Open anikethsaha opened this issue 4 years ago • 7 comments

Add both plugin in webpack.dev.js to create and lint the HTML template while webpack build.

ref This

ref this

anikethsaha avatar May 25 '20 09:05 anikethsaha

hye, can i take work on this issue.?

ruhci28 avatar Jul 12 '20 05:07 ruhci28

Sure

anikethsaha avatar Jul 12 '20 06:07 anikethsaha

Hye aniket i am new to open source can you guide me on my work . const merge = require('webpack-merge'); const common = require('./webpack.common.js'); const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); process.env.NODE_ENV = process.env.NODE_ENV || 'development'; const Htmlwebpackconfig ={ entry: 'index.js', output: { path: __dirname + '/dist', filename: 'index_bundle.js' }, plugins: [ new HtmlWebpackPlugin() ] } const BrowserConfig = { name: 'browser', entry: './src/client/index.js', output: { path: path.resolve(__dirname), filename: '../public/js/app.bundle.js', publicPath: '/', }, target: 'web', devServer: { historyApiFallback: true, }, stats: { colors: true, }, devtool: 'source-map', plugins: [ new webpack.DefinePlugin({ isBrowser: 'true', }), ], };

const ServerConfig = { name: 'server', entry: './src/server/index.js', output: { path: path.resolve(__dirname), filename: '../bin/server.js', libraryTarget: 'commonjs2', publicPath: '/', }, node: { __dirname: false, }, target: 'node', plugins: [ new webpack.DefinePlugin({ isBrowser: 'false', }), ],

devServer: {
	historyApiFallback: true,
},

};

const browserWebpackConfig = merge(common, BrowserConfig); const serverWebpackConfig = merge(common, ServerConfig); const htmlwebpackcongig = merge(common,Htmlwebpackconfig); module.exports = [browserWebpackConfig, serverWebpackConfig,htmlwebpackcongig]; here is the new webpack.dev.s is i am going right .?

ruhci28 avatar Jul 16 '20 17:07 ruhci28

You can refer how to add from this

Also, feel free to submit a draft PR if you are not sure. We can discuss there.

anikethsaha avatar Jul 16 '20 17:07 anikethsaha

okay Thanks for the help

ruhci28 avatar Jul 16 '20 17:07 ruhci28

I would like to work on this issue

programmer-dost avatar Aug 11 '23 15:08 programmer-dost

Hey I'd love to work on this issue

mhgarry avatar Dec 09 '23 22:12 mhgarry