-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
42 lines (40 loc) · 1.08 KB
/
webpack.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const { merge } = require('webpack-merge')
const common = require('./webpack.common')
const webpack = require('webpack')
const config = require('./src/config/settings')
const ESLintPlugin = require('eslint-webpack-plugin')
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
const {
DISCOGS_CONSUMER_KEY,
DISCOGS_CONSUMER_SECRET,
SPOTIFY_CLIENT_ID,
SPOTIFY_CLIENT_SECRET
} = config
module.exports = merge(common, {
mode: 'development',
devtool: 'cheap-module-source-map',
devServer: {
historyApiFallback: true,
port: 3000
},
performance: {
hints: false
},
plugins: [
new webpack.DefinePlugin({
PRODUCTION_ENV: false,
DISCOGS_CONSUMER_KEY: `"${DISCOGS_CONSUMER_KEY}"`,
DISCOGS_CONSUMER_SECRET: `"${DISCOGS_CONSUMER_SECRET}"`,
SPOTIFY_CLIENT_ID: `"${SPOTIFY_CLIENT_ID}"`,
SPOTIFY_CLIENT_SECRET: `"${SPOTIFY_CLIENT_SECRET}"`,
SENTRY_DSN: 'null'
}),
new ESLintPlugin({
failOnError: false
}),
new ReactRefreshWebpackPlugin()
],
optimization: {
moduleIds: 'named'
}
})