iportal
Version:
web-portal
50 lines (48 loc) • 924 B
JavaScript
const ip = require('ip')
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const mode = 'development'
const entrys = {
main: './demo/index.ts'
}
module.exports = {
mode: mode,
devtool: 'source-map',
entry: entrys,
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].js'
},
resolve: {
extensions: [".js", ".ts", ".html"]
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: ["ts-loader"]
},
{
test: /\.html$/i,
use: 'text-loader'
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
title: 'web-portal'
}),
],
devServer:{
host: ip.address(),
hot: true
},
watchOptions: {
poll: 500,
aggregateTimeout: 100,
ignored: '/node_moduels/'
}
}