123456789101112131415161718192021222324252627282930313233343536373839 |
- const path = require('path');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const webpack = require('webpack');
- module.exports = {
- entry:'./src/index.js',
- output:{
- filename: "main.js",
- path:path.resolve(__dirname, 'dist'),
- publicPath:'/'
- },
- mode:'development',
- devtool: 'inline-source-map',
- devServer: {
- contentBase: './dist',
- proxy:{
- '/api':'http://192.168.2.236:5050'
- },
- hot: true
- },
- plugins: [
- new HtmlWebpackPlugin({
- title: 'Output Management'
- })
- ],
- module: {
- rules: [
- {
- test: /\.js$/,
- use: "imports-loader?$=jquery"
- },
- {
- test:/\.less/,
- use:['style-loader','css-loader','less-loader']
- }
- ]
- }
- }
|