Nessuna descrizione

webpack.config.demo.dev.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. const webpack = require('webpack');
  2. module.exports = {
  3. mode: "development",
  4. entry: [
  5. './demo/client.tsx'
  6. ],
  7. output: {
  8. filename: 'bundle.js',
  9. path: '/',
  10. publicPath: '/'
  11. },
  12. devtool: 'source-map',
  13. resolve: {
  14. extensions: ['.ts', '.tsx', '.js', '.jsx']
  15. },
  16. module: {
  17. rules: [
  18. { test: /\.ts(x?)/, use: ['awesome-typescript-loader'], exclude: /node_modules/ },
  19. {test: /\.css/, use: ['style-loader', 'css-loader']},
  20. {
  21. test: /\.scss$/, use: [
  22. {
  23. loader: 'style-loader'
  24. },
  25. {
  26. loader: 'css-loader', options: {sourceMap: true}
  27. },
  28. {
  29. loader: 'sass-loader', options: {sourceMap: true}
  30. }]
  31. },
  32. { test: /\.jpe?g$|\.gif$|\.png$|\.ico$/, use: 'file-loader?name=[name].[ext]' },
  33. { test: /\.eot|\.ttf|\.svg|\.woff2?/, use: 'file-loader?name=[name].[ext]' },
  34. ]
  35. },
  36. stats: {
  37. colors: true
  38. }
  39. };