-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpartial.html
More file actions
21 lines (20 loc) · 597 Bytes
/
partial.html
File metadata and controls
21 lines (20 loc) · 597 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<h1>Hello world!</h1><h2>webpack.config.js</h2><img src="images/webpack.png"><pre>
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPartialsPlugin = require('html-webpack-partials-plugin');
module.exports = {
entry: {
main: path.join(__dirname, './main.js')
},
output: {
path: path.join(__dirname, './dist'),
filename: '[name].js'
},
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackPartialsPlugin({
path: path.join(__dirname, './partials/body.html')
})
]
};
</pre><script src="main.js"></script>