123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- const {resolve} = require('path')
- const HtmlWebpackPlugin = require('html-webpack-plugin')
- module.exports = {
- entry: './src/index.js',
- output: {
- filename:'[name].js',
- path:resolve(__dirname,'build')
- },
- module:{
- rules:[
- {
- test:/\.css$/,
- use:['style-loader','css-loader']
- }
- ]
- },
- plugins: [
- new HtmlWebpackPlugin()
- ],
- mode: 'development',
-
- resolve:{
-
- alias:{
- $css: resolve(__dirname,'src/css')
- },
-
- extensions:[
- '.js','.json','.css'
- ],
-
- modules:[
- resolve(__dirname,'../node_modules'),'node_modules'
- ]
- },
- devServer:{
-
- contentBase: resolve(__dirname,'build'),
-
- watchContentBase:true,
-
- watchOptions:{
- ignored: /node_modules/
- },
-
- conpress: true,
-
- port:3000,
- host:'localhost',
-
- open:true,
-
- hot:true,
-
- clientLogLevel:'none',
-
- quiet:true,
-
- overlay: false,
-
- proxy:{
- '/api':{
- target:'http://localhost:3000',
-
- pathRewrite:{
- '^/api':''
- }
- }
- }
- }
- }
|