123456789101112131415161718192021222324252627282930313233343536 |
- const path = require('path');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
-
- module.exports = {
- mode: 'development',
- entry: './example/main.ts',
- devtool: 'inline-source-map',
- devServer: {
- contentBase: './dist',
- compress: true,
- hot: true,
- },
- plugins: [
- new HtmlWebpackPlugin({
- title: 'index'
- })
- ],
- output: {
- filename: 'main.js',
- path: path.resolve(__dirname, 'dist')
- },
- module: {
- rules: [{
- test: /\.ts$/,
- use: "ts-loader"
- }]
- },
- resolve: {
- extensions: [
- '.ts',
- '.js',
- '.tsx'
- ]
- }
- };
|