Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. {
  2. "name": "RPCS",
  3. "version": "1.0.0",
  4. "description": "",
  5. "main": "index.js",
  6. "watch": {
  7. "build": "Scripts/es6/*.js"
  8. },
  9. "scripts": {
  10. "watch": "npm-watch",
  11. "build": "babel Scripts/es6/ --out-file Scripts/build/bundle.js"
  12. },
  13. "keywords": [],
  14. "author": "",
  15. "license": "ISC",
  16. "devDependencies": {
  17. "@babel/cli": "^7.4.4",
  18. "@babel/core": "^7.4.5",
  19. "@babel/plugin-proposal-class-properties": "^7.4.4",
  20. "@babel/preset-env": "^7.4.5",
  21. "babel-loader": "^8.0.6",
  22. "babel-polyfill": "^6.26.0",
  23. "npm-watch": "^0.6.0",
  24. "webpack": "^4.35.0",
  25. "webpack-cli": "^3.3.5"
  26. }
  27. }
  28.  
  29. import Person from './person';
  30.  
  31. var person = new Person("David", 30);
  32. person.speak();
  33.  
  34. import Person from './person';
  35.  
  36. var person = new Person("David", 30);
  37. person.speak();
  38.  
  39. console.log("Test");
  40.  
  41. {
  42. "presets": ["@babel/preset-env"],
  43. "plugins": ["@babel/plugin-proposal-class-properties"]
  44. }
  45.  
  46. const path = require('path');
  47.  
  48. module.exports = {
  49. entry: ['./Scripts/es6/main.js'],
  50. output: {
  51. path: path.resolve(__dirname, './Scripts/build'),
  52. filename: 'bundle.js'
  53. },
  54.  
  55. module: {
  56. rules: [{
  57. test: /.js$/,
  58. exclude: /node_modules/,
  59. use: {
  60. loader: "babel-loader"
  61. }
  62. }]
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement