Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. const path = require('path');
  2. const webpack = require('webpack');
  3. const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
  4. const autoprefixer = require('autoprefixer');
  5.  
  6. module.exports = {
  7. context: __dirname,
  8. debug: true,
  9. devtool: 'cheap-module-source-map',
  10. entry: './client/src/App.jsx',
  11. output: {
  12. path: path.join(__dirname, './client/public'),
  13. filename: 'bundle.js',
  14. },
  15. resolve: {
  16. extensions: ['', '.js', '.jsx', '.json'],
  17. },
  18. externals: {
  19. },
  20. stats: {
  21. colors: true,
  22. reasons: true,
  23. chunks: false,
  24. },
  25. plugins: [
  26. new webpack.IgnorePlugin(/^./locale$/, /moment$/),
  27. // new BundleAnalyzerPlugin(),
  28. new webpack.DefinePlugin({
  29. 'process.env': {
  30. NODE_ENV: JSON.stringify('production'),
  31. },
  32. }),
  33. ],
  34. module: {
  35. preLoaders: [
  36. {
  37. test: /.jsx$/,
  38. loader: 'babel-loader',
  39. exclude: /node-modules/,
  40. },
  41. ],
  42. noParse: [
  43. /plotly.js/,
  44. ],
  45. loaders: [
  46. {
  47. test: /.styl$/,
  48. loader: 'style-loader!css-loader!stylus-loader',
  49. },
  50. {
  51. test: /.scss$/,
  52. loader: 'style-loader!css-loader!postcss-loader!sass-loader',
  53. },
  54. {
  55. test: /.jsx?$/,
  56. loader: 'babel-loader',
  57. },
  58. {
  59. test: /.json$/,
  60. loader: 'json-loader',
  61. },
  62. {
  63. test: /.(jpe?g|png|gif|svg|ico|ttf)$/i,
  64. loader: 'file-loader',
  65. },
  66. ],
  67. },
  68. postcss: [autoprefixer({ browsers: ['last 2 versions'] })],
  69. watch: false,
  70. };
  71.  
  72. "dependencies": {
  73. "bluebird": "^3.4.6",
  74. "classnames": "^2.2.5",
  75. "connect-history-api-fallback": "^1.3.0",
  76. "dotenv": "^2.0.0",
  77. "express": "^4.14.0",
  78. "http-status-codes": "^1.0.6",
  79. "koa": "^1.2.4",
  80. "koa-add-trailing-slashes": "^1.1.0",
  81. "koa-basic-auth": "^1.1.2",
  82. "koa-jwt": "^1.2.0",
  83. "koa-mount": "^1.3.0",
  84. "koa-route": "^2.4.2",
  85. "koa-static": "^2.0.0",
  86. "material-ui": "^0.16.2",
  87. "materialize-css": "^0.97.8",
  88. "moment": "^2.15.2",
  89. "pm2": "^2.1.6",
  90. "react": "^15.4.0",
  91. "react-dom": "^15.4.0",
  92. "react-materialize": "^0.17.0",
  93. "react-redux": "^4.4.5",
  94. "react-router": "^3.0.0",
  95. "react-tap-event-plugin": "^2.0.0",
  96. "react-tooltip": "^3.2.2",
  97. "redux": "^3.6.0"
  98. },
  99. "devDependencies": {
  100. "autofixture": "^0.1.2",
  101. "autoprefixer": "^6.5.4",
  102. "babel-core": "^6.18.0",
  103. "babel-eslint": "^6.1.2",
  104. "babel-jest": "^16.0.0",
  105. "babel-loader": "^6.2.7",
  106. "babel-plugin-transform-decorators-legacy": "^1.3.4",
  107. "babel-preset-es2015": "^6.18.0",
  108. "babel-preset-react": "^6.16.0",
  109. "babel-preset-stage-0": "^6.16.0",
  110. "babel-register": "^6.18.0",
  111. "bluebird": "^3.4.6",
  112. "chai": "^3.5.0",
  113. "child_process": "^1.0.2",
  114. "co-supertest": "0.0.10",
  115. "concurrently": "^3.1.0",
  116. "css-loader": "^0.25.0",
  117. "enzyme": "^2.5.1",
  118. "eslint": "^3.9.1",
  119. "eslint-config-airbnb": "^12.0.0",
  120. "eslint-plugin-import": "^2.0.1",
  121. "eslint-plugin-jsx-a11y": "^2.2.3",
  122. "eslint-plugin-react": "^6.4.1",
  123. "file-loader": "^0.9.0",
  124. "gulp": "^3.9.1",
  125. "gulp-batch": "^1.0.5",
  126. "gulp-debug": "^2.1.2",
  127. "gulp-eslint": "^3.0.1",
  128. "gulp-exit": "0.0.2",
  129. "gulp-jest": "^0.6.0",
  130. "gulp-mocha": "^3.0.1",
  131. "gulp-notify": "^2.2.0",
  132. "gulp-plumber": "^1.1.0",
  133. "gulp-run": "^1.7.1",
  134. "gulp-tap": "^0.1.3",
  135. "gulp-testcafe": "^0.9.0",
  136. "gulp-watch": "^4.3.11",
  137. "gulp-webserver": "^0.9.1",
  138. "jest": "^16.0.2",
  139. "jquery": "^3.1.1",
  140. "json-loader": "^0.5.4",
  141. "live-server": "^1.1.0",
  142. "lodash": "^4.16.6",
  143. "materialize-css": "^0.97.8",
  144. "mocha": "^3.1.2",
  145. "node-materialize": "^1.1.1",
  146. "node-sass": "^3.11.2",
  147. "postcss-loader": "^1.2.1",
  148. "react-addons-test-utils": "^15.4.0",
  149. "react-test-renderer": "^15.4.0",
  150. "request-promise": "^4.1.1",
  151. "require-dir": "^0.3.1",
  152. "sass": "^0.5.0",
  153. "sass-loader": "^4.0.2",
  154. "sass-rem": "^1.2.3",
  155. "sinon": "^1.17.6",
  156. "style-loader": "^0.13.1",
  157. "stylus": "^0.54.5",
  158. "stylus-loader": "^2.3.1",
  159. "supertest": "^2.0.1",
  160. "supertest-koa-agent": "^0.3.0",
  161. "testcafe": "^0.9.0",
  162. "webpack": "^1.13.3",
  163. "webpack-bundle-analyzer": "^2.1.1",
  164. "webpack-dev-server": "^1.16.2"
  165. },
  166. "jest": {
  167. "moduleFileExtensions": [
  168. "js",
  169. "jsx"
  170. ],
  171. "moduleNameMapper": {
  172. "^.+\.(css|styl|scss)$": "<rootDir>/test/mocks/styleMock.js",
  173. "^.+\.(gif|ttf|eot|svg)$": "<rootDir>/test/mocks/fileMock.js"
  174. },
  175. "moduleDirectories": [
  176. "node_modules"
  177. ],
  178. "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
  179. "testPathDirs": [
  180. "test/ui"
  181. ],
  182. "testRegex": ".*-tests\.(js|jsx)$"
  183. }
  184. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement