{"size": 735, "ext": "js", "max_stars_repo_path": "webpack-02/webpack.config.js", "max_stars_repo_name": "chentanran/vue", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "webpack-02/webpack.config.js", "max_issues_repo_name": "chentanran/vue", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack-02/webpack.config.js", "max_forks_repo_name": "chentanran/vue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.4, "max_line_length": 102, "alphanum_fraction": 0.5197278912}
const path = require("path")
const HTMLWebpackPlugin = require("html-webpack-plugin")

module.exports = {
    mode: "development",
    entry: "./src/main.js",
    output: {
        path: path.join(__dirname,"dist"),
        filename: "bundle.js"
    },
    plugins:[
        new HTMLWebpackPlugin({
            template: path.join(__dirname, "./src/index.html"), //将index.html文件托管到内存
            filename: "index.html"
        })
    ],
    module:{
        rules:[
            {test: /\.css$/, use:["style-loader", "css-loader"]},
            {test: /\.(png|jpg|jpeg|gif)/, use: ["url-loader?limit=7000&name=[hash:8].[name].[ext]"]},
            {test: /\.(eot|svg|ttf|woff|woff2)/, use: ['url-loader']}
            
        ]
    }
}