Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const nodeExternals = require('webpack-node-externals');
const path = require('path');
const appPath = (...names) => path.join(process.cwd(), ...names);
const userConfig = require(appPath('webpack.config.js'));
const packageJson = require(appPath('package.json'));
const PORT = process.env.PORT || 8080;
module.exports = webpackMerge(
createConfig([
setMode(
process.env.NODE_ENV === 'production' ? 'production' : 'development'
),
typescript({
useCache: true,
cacheDirectory: 'node_modules/.cache/at-loader'
}),
tslint(),
resolve({ extensions: ['.js', '.jsx'] }),
match(
['*.scss', '*.sass'],
[
css(),
sass({
includePaths: [appPath('node_modules')],
sourceMap: true
}),