Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anikethsaha opened this issue May 25, 2020 · 7 comments
Open

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

anikethsaha opened this issue May 25, 2020 · 7 comments
Labels

Comments

@anikethsaha
Copy link
Owner

anikethsaha commented May 25, 2020

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

ref This

ref this

@ruhci28
Copy link

ruhci28 commented Jul 12, 2020

hye, can i take work on this issue.?

@anikethsaha
Copy link
Owner Author

Sure

@ruhci28
Copy link

ruhci28 commented Jul 16, 2020

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
Copy link
Owner Author

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
Copy link

ruhci28 commented Jul 16, 2020

okay Thanks for the help

@Programmer-Dost
Copy link

I would like to work on this issue

@mhgarry
Copy link

mhgarry commented Dec 9, 2023

Hey I'd love to work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants