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

69 lines
1.8 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
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. import postcssPresetEnv from 'postcss-preset-env'
  6. const config: Configuration = {
  7. mode: 'development',
  8. devtool: 'eval-source-map',
  9. entry: {
  10. app: resolve(__dirname, './index.tsx'),
  11. },
  12. output: {
  13. path: resolve(__dirname, '../../../../dist/apps/text-app/'),
  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: /\.css$/,
  33. use: [
  34. MiniCssExtractPlugin.loader,
  35. {
  36. loader: 'css-loader',
  37. options: {
  38. importLoaders: 1,
  39. },
  40. },
  41. {
  42. loader: 'postcss-loader',
  43. options: {
  44. plugins: [
  45. postcssPresetEnv({
  46. stage: 2,
  47. }),
  48. ]
  49. }
  50. }
  51. ],
  52. },
  53. ],
  54. },
  55. plugins: [
  56. new HtmlWebpackPlugin({
  57. title: 'Text App',
  58. hash: true,
  59. template: resolve(__dirname, './index.ejs'),
  60. filename: 'composer.html',
  61. }),
  62. new MiniCssExtractPlugin({
  63. filename: '[name].css',
  64. }),
  65. ],
  66. }
  67. export default config