webpack.config.js 343 B

123456789101112131415161718192021222324
  1. const path = require('path');
  2. module.exports = {
  3. // The entry point
  4. entry: './src/js/main.ts',
  5. watch: true,
  6. module: {
  7. rules: [
  8. {
  9. test: /\.ts$/,
  10. use: 'ts-loader',
  11. exclude: /node_modules/
  12. }
  13. ]
  14. },
  15. resolve: {
  16. extensions: ['.ts']
  17. },
  18. output: {
  19. filename: 'main.js',
  20. path: path.resolve(__dirname, 'build/js')
  21. }
  22. }