Guest User

Untitled

a guest
Mar 17th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. [nodemon] restarting due to changes...
  2. [nodemon] restarting due to changes...
  3. [nodemon] starting `babel-node src/server.js`
  4. Live Reload listening on port 35729
  5.  
  6. app start over the port 3000
  7. × 「wdm」: Hash: 523d77cec06d570174bb
  8. Version: webpack 4.1.1
  9. Time: 1211ms
  10. Built at: 2018-3-17 10:37:04
  11. Asset Size Chunks Chunk Names
  12. bundle.js 752 bytes 0 main
  13. Entrypoint main = bundle.js
  14. [0] ./src/client/index.jsx 208 bytes {0} [built] [failed] [1 error]
  15.  
  16. WARNING in configuration
  17. The 'mode' option has not been set. Set 'mode' option to 'development' or 'production' to enable defaults for this environment.
  18.  
  19. ERROR in ./src/client/index.jsx
  20. Module parse failed: Unexpected token (5:11)
  21. You may need an appropriate loader to handle this file type.
  22. |
  23. | const App = () => {
  24. | return <h1>Hola Mundo</h1>;
  25. | };
  26. |
  27. Child html-webpack-plugin for "index.html":
  28. Asset Size Chunks Chunk Names
  29. index.html 531 KiB 0
  30. Entrypoint undefined = index.html
  31. [0] (webpack)/buildin/module.js 519 bytes {0} [built]
  32. [1] (webpack)/buildin/global.js 509 bytes {0} [built]
  33. [2] ./node_modules/lodash/lodash.js 527 KiB {0} [built]
  34. [3] ./node_modules/html-webpack-plugin/lib/loader.js!./src/client/index.html 558 bytes {0} [built]
  35. i 「wdm」: Failed to compile.
  36.  
  37. import React from 'react';
  38. import {render} from 'react-dom';
  39.  
  40. const App = () => {
  41. return <h1>Hola Mundo</h1>;
  42. };
  43.  
  44. render(
  45. <App/>,
  46. document.getElementById('app')
  47. )
  48.  
  49. import webpack from 'webpack';
  50. import htmlWebpackPlugin from 'html-webpack-plugin';
  51. import LiveReloadPlugin from 'webpack-livereload-plugin';
  52.  
  53. export default {
  54.  
  55. entry: './src/client/index.jsx',
  56. output: {
  57. path: '/',
  58. filename: 'bundle.js'
  59. },
  60.  
  61. module: {
  62. rules: [
  63. {
  64. test: '/.jsx$/',
  65. use:{
  66. loader:'babel-loader'
  67. },
  68. exclude: /node_modules/
  69. },
  70. {
  71. use: ['style-loader','css-loader'],
  72. test: '/.css$/'
  73. },
  74. {
  75. test: '/.scss$/',
  76. use: [
  77. {
  78. loader: 'style-loader'
  79. },
  80.  
  81. {
  82. loader: 'css-loader',
  83. options:
  84. {
  85. sourceMap: true
  86. }
  87. },
  88.  
  89. {
  90. loader: 'sass-loader',
  91. options:
  92. {
  93. sourceMap: true
  94. }
  95.  
  96. }
  97.  
  98. ]
  99. }
  100. ]
  101. },
  102.  
  103. plugins: [
  104.  
  105. new htmlWebpackPlugin({
  106. template: './src/client/index.html'
  107. }),
  108.  
  109. new LiveReloadPlugin()
  110.  
  111. ]
  112.  
  113. };
  114.  
  115. {
  116. "name": "reactnode",
  117. "version": "1.0.0",
  118. "description": "scaffoldproject",
  119. "main": "index.js",
  120. "scripts": {
  121. "dev": "nodemon --exec babel-node src/server.js"
  122. },
  123. "author": "PterPmntaM",
  124. "license": "ISC",
  125. "devDependencies": {
  126. "babel-cli": "^6.26.0",
  127. "babel-core": "^6.26.0",
  128. "babel-loader": "^7.1.4",
  129. "babel-preset-env": "^1.6.1",
  130. "babel-preset-react": "^6.24.1",
  131. "css-loader": "^0.28.10",
  132. "html-webpack-plugin": "^3.0.6",
  133. "node-sass": "^4.7.2",
  134. "nodemon": "^1.17.2",
  135. "sass-loader": "^6.0.7",
  136. "style-loader": "^0.20.3",
  137. "webpack": "^4.1.1",
  138. "webpack-dev-middleware": "^3.0.1",
  139. "webpack-livereload-plugin": "^2.0.0"
  140. },
  141. "dependencies": {
  142. "express": "^4.16.3",
  143. "react": "^16.2.0",
  144. "react-dom": "^16.2.0"
  145. }
  146. }
Add Comment
Please, Sign In to add comment