12345678910111213141516171819202122232425262728293031323334353637383940 |
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const path = require('path');
- module.exports = {
- entry: './src/index.tsx',
- mode: 'development',
- resolve: {
- extensions: ['.ts', '.tsx', '.js', '.json']
- },
- output: {
- path: path.join(__dirname, '/dist'),
- filename: 'bundle.min.js'
- },
- module: {
- rules: [
- {
- test: /\.tsx?$/,
- use: [
- 'ts-loader'
- ]
- },
- {
- test: /\.scss?$/,
- use: [
- 'style-loader',
- 'css-loader',
- 'sass-loader',
- {
- loader: 'sass-resources-loader',
- options: { resources: './src/styles/resources.scss' }
- }
- ]
- }
- ]
- },
- plugins: [
- new HtmlWebpackPlugin({
- template: "./src/index.html"
- }),
- ]
- };
|