Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. const webpack = require('webpack');
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3.  
  4. module.exports = {
  5. mode: 'development',
  6.  
  7. entry: './src/index.tsx',
  8.  
  9. devServer: {
  10. historyApiFallback: true,
  11. inline: true,
  12. port: 3000,
  13. hot: true,
  14. publicPath: '/',
  15. },
  16.  
  17. module: {
  18. rules: [
  19. {
  20. test: /\.tsx?$/,
  21. use: ['babel-loader', 'ts-loader'],
  22. },
  23. ],
  24. },
  25.  
  26. resolve: {
  27. extensions: ['.js', 'jsx', '.ts', '.tsx'],
  28. },
  29.  
  30. plugins: [
  31. new webpack.HotModuleReplacementPlugin(),
  32. new HtmlWebpackPlugin({
  33. filename: 'index.html',
  34. template: 'public/index_dev.html',
  35. }),
  36. ],
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement