[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.

59 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. filename: '[name].js',
  14. },
  15. optimization: {
  16. splitChunks: {
  17. chunks: 'all',
  18. },
  19. },
  20. resolve: {
  21. extensions: ['.ts', '.tsx', '.js'],
  22. },
  23. module: {
  24. rules: [
  25. {
  26. test: /\.ts(x?)$/,
  27. exclude: /node_modules/,
  28. use: 'ts-loader',
  29. },
  30. {
  31. test: /\.scss$/,
  32. use: [
  33. MiniCssExtractPlugin.loader,
  34. 'css-loader',
  35. {
  36. loader: 'sass-loader',
  37. options: {
  38. sourceMap: true,
  39. },
  40. },
  41. ],
  42. },
  43. ],
  44. },
  45. plugins: [
  46. new HtmlWebpackPlugin({
  47. title: 'Text App',
  48. hash: true,
  49. template: resolve(__dirname, './index.ejs'),
  50. filename: 'composer.html',
  51. }),
  52. new MiniCssExtractPlugin({
  53. filename: '[name].css',
  54. }),
  55. ],
  56. }
  57. export default config