Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. //webpack.config.js
  2. const path = require('path');
  3.  
  4. module.exports = {
  5. entry: path.join(__dirname, './src/app.ts'),
  6. output: {
  7. filename: 'app.js',
  8. path: __dirname
  9. },
  10. module: {
  11. rules: [
  12. {
  13. test: /.tsx?$/,
  14. loader: 'ts-loader',
  15. exclude: /node_modules/,
  16. },
  17. ]
  18. },
  19. resolve: {
  20. extensions: [".tsx", ".ts", ".js"]
  21. },
  22. };
  23.  
  24. //tsconfig.json
  25. {
  26. "compilerOptions": {
  27. "module": "commonjs",
  28. "target": "es5",
  29. "lib": ["es2018", "dom"],
  30. "sourceMap": true
  31. },
  32. "exclude": [
  33. "node_modules"
  34. ]
  35. }
  36.  
  37. //package.json
  38. {
  39. "name": "gym-system",
  40. "version": "1.0.0",
  41. "description": "",
  42. "private": true,
  43. "scripts": {
  44. "start": "webpack-dev-server",
  45. "test": "echo "Error: no test specified" && exit 1"
  46. },
  47. "keywords": [],
  48. "author": "",
  49. "license": "ISC",
  50. "dependencies": {
  51. "body-parser": "^1.19.0",
  52. "express": "^4.16.4",
  53. "knex": "^0.16.5",
  54. "objection": "^1.6.8",
  55. "tiny-lr": "^1.1.1",
  56. "tslint": "^5.18.0"
  57. },
  58. "devDependencies": {
  59. "@types/express": "^4.16.1",
  60. "@types/lodash": "^4.14.136",
  61. "objection": "^1.6.8",
  62. "pg": "^7.10.0",
  63. "ts-loader": "^6.0.4",
  64. "tslint-config-airbnb": "^5.11.1",
  65. "typescript": "^2.9.2",
  66. "webpack": "^4.36.1",
  67. "webpack-cli": "^3.3.6",
  68. "webpack-dev-server": "^3.7.2"
  69. }
  70. }
  71.  
  72.  
  73. Estrutura do projeto
  74. -src
  75. --app.ts
  76. -webpackconfig.js
  77. -package.json
  78. -tsconfig.json
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement