38 lines
767 B
JavaScript
38 lines
767 B
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: './index.js',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'index.js',
|
|
clean: true,
|
|
},
|
|
// devServer: {
|
|
// open: true,
|
|
// port: 5000,
|
|
// },
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
{
|
|
test: /\.s[ac]ss$/i,
|
|
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
// plugins: [
|
|
// new HtmlWebpackPlugin({
|
|
// template: path.resolve(__dirname, './test/index.html'),
|
|
// filename: 'index.html',
|
|
// }),
|
|
// ],
|
|
};
|