| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- const path = require('path');
- const HtmlWebpackPlugin = require('html-webpack-plugin')
- module.exports = {
- entry: {
- contact: './src/contact/index.js',
- framework: ['react','react-dom'],
- staff:'./src/staff/index.js',
- workbench:'./src/workbench/index.js',
- },
- output: {
- filename: 'js/bundle.js',
- path: path.resolve(__dirname, '../dist')
- },
- module: {
- rules: [
- {
- test: /\.(js|jsx)$/,
- use: 'babel-loader',
- exclude: /node_modules/,
- },
- // {
- // test: /\.css$/,
- // use: [
- // {
- // loader:'style-loader',
- // options:{
- // insert:'top'
- // }
- // },
- // 'css-loader'],
- // },
- // {
- // test: /\.(eot|woff)$/, loader: "file-loader"
- // }
- ]
- },
- plugins: [
- new HtmlWebpackPlugin({
- template: 'public/sub_index.html',
- filename: 'contact/contact.html',
- chunks:['contact','framework']
- }),
- new HtmlWebpackPlugin({
- template: 'public/sub_index.html',
- filename: 'staff/staff.html',
- chunks:['staff','framework']
- }),
- ]
- }
|