Guest User

Untitled

a guest
Oct 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. module.exports = {
  2. // The absolute path to your project
  3. context: __dirname + "/",
  4. // the entry point for our app
  5. entry: './main.js',
  6. // where to put the compiled output (what our script tag will link to)
  7. output: {
  8. // where does it go?
  9. path: __dirname + "/",
  10. // what is the file called?
  11. filename: 'bundle.js'
  12. },
  13. // how can we debug our bundle? for dev : eval for production, we can use 'source-map'
  14. devtool: 'source-map',
  15. module: {
  16. rules: [
  17. {
  18. //Check for all js files
  19. test: /\.js$/,
  20. // Don't include node_modules directory in the search for js files
  21. exclude: /node_modules/,
  22. // Use the babel-loader plugin to transpile the javascript
  23. use: [{
  24. loader: 'babel-loader',
  25. options: { presets: ['es2015'] }
  26. }]
  27. } , {
  28. test: /\.css$/,
  29. use: [{
  30. loaders: ['style-loader','css-loader']
  31. }]
  32. }
  33. ]
  34. }
  35. };
Add Comment
Please, Sign In to add comment