included source-maps for debugging locally
This commit is contained in:
@@ -11,6 +11,7 @@ This project is a simplified front end clone of Netflix. It was created with Rea
|
||||
- [ ] Update modal to current styling
|
||||
- [ ] Update carousel to current styling
|
||||
- [ ] Create movie page screen
|
||||
- [ ] Migrate to Typescript
|
||||
|
||||
### Tools used
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
|
||||
const dotenv = require('dotenv')
|
||||
const webpack = require('webpack')
|
||||
var path = require('path')
|
||||
const prod =
|
||||
(process.env.NODE_ENV ? process.env.NODE_ENV : '').trim() === 'production'
|
||||
const path = require('path')
|
||||
|
||||
module.exports = () => {
|
||||
// call dotenv and it will return an Object with a parsed key
|
||||
@@ -21,7 +23,11 @@ module.exports = () => {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'bundle.js',
|
||||
publicPath: '/',
|
||||
clean: true,
|
||||
},
|
||||
mode: prod ? 'production' : 'development',
|
||||
// Enable sourcemaps for debugging webpack's output.
|
||||
devtool: prod ? 'none' : 'eval-source-map',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user