mern
mern copied to clipboard
Add htmllinter-webpack-plugin and html-webpack-plugin
Add both plugin in webpack.dev.js
to create and lint the HTML template while webpack build.
ref This
ref this
hye, can i take work on this issue.?
Sure
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 .?
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.
okay Thanks for the help
I would like to work on this issue
Hey I'd love to work on this issue