[ABANDONDED] Set of "apps" for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.5 KiB

5 years ago
  1. import { resolve } from 'path'
  2. import { Configuration } from 'webpack'
  3. import HtmlWebpackPlugin from 'html-webpack-plugin'
  4. import MiniCssExtractPlugin from 'mini-css-extract-plugin'
  5. const config: Configuration = {
  6. mode: 'development',
  7. devtool: 'eval-source-map',
  8. entry: {
  9. app: resolve(__dirname, './index.tsx'),
  10. },
  11. output: {
  12. path: resolve(__dirname, '../../../../dist/apps/text-app/'),
  13. // publicPath: '/',
  14. filename: '[name].js',
  15. },
  16. optimization: {
  17. splitChunks: {
  18. chunks: 'all',
  19. },
  20. },
  21. resolve: {
  22. extensions: ['.ts', '.tsx', '.js'],
  23. },
  24. module: {
  25. rules: [
  26. {
  27. test: /\.ts(x?)$/,
  28. exclude: /node_modules/,
  29. use: 'ts-loader',
  30. },
  31. {
  32. test: /\.scss$/,
  33. use: [
  34. MiniCssExtractPlugin.loader,
  35. 'css-loader',
  36. {
  37. loader: 'sass-loader',
  38. options: {
  39. sourceMap: true,
  40. },
  41. },
  42. ],
  43. },
  44. ],
  45. },
  46. plugins: [
  47. new HtmlWebpackPlugin({
  48. title: 'Text App',
  49. hash: true,
  50. template: resolve(__dirname, './index.ejs'),
  51. filename: 'composer.html',
  52. }),
  53. new MiniCssExtractPlugin({
  54. filename: '[name].css',
  55. }),
  56. ],
  57. }
  58. export default config