anikethsaha / mern

:tada: This is boilerplate for MERN stack with integrations like Redux and SSR :tada:
https://mern.netlify.com
MIT License
98 stars 44 forks source link

Add htmllinter-webpack-plugin and html-webpack-plugin #148

Open anikethsaha opened 4 years ago

anikethsaha commented 4 years ago

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

ref This

ref this

ruhci28 commented 3 years ago

hye, can i take work on this issue.?

anikethsaha commented 3 years ago

Sure

ruhci28 commented 3 years ago

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 .?

anikethsaha commented 3 years ago

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.

ruhci28 commented 3 years ago

okay Thanks for the help

Programmer-Dost commented 11 months ago

I would like to work on this issue

mhgarry commented 6 months ago

Hey I'd love to work on this issue