What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-20 08:19:14
$refreshing$ is not defined
hey this worked for me to handle this issue, follow this step by step 1.install cross-env 2.add cross-env NODE_ENV=production and cross-env NODE_ENV=development 3. follow this config ``` const isDevPlugin = ['react-refresh/babel'] const isProdPlugin = ... Add solution -
Javascript 2021-09-30 09:45:05
how to manage logging using winston for production and development in node js "github"
const winston = require('winston'); const { createLogger, format, transports } = require('winston'); const dotenv = require('dotenv'); dotenv.config(); var logger = createLogger({ level: 'info', format: format.combine( format.timestamp({... Add solution -
Javascript 2021-09-29 22:54:04
axios default baseurl conditional environment
import axios from 'axios' window.axios.defaults.headers.common = {'X-Requested-With': 'XMLHttpRequest'} window.axios.defaults.baseURL = (process.env.NODE_ENV !== 'production') ? 'http://localhost:9000/api/' : '' Add solution -
Javascript 2021-09-17 20:29:02
'@babel/plugin-proposal-class-properties' webpack
const path = require('path'); const webpack = require('webpack'); module.exports = { target: 'node', mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', entry: [ './src/index.js' ], output: { path: path.resolve(__dirna... Add solution