mirror of
https://github.com/Kong/insomnia
synced 2024-11-12 17:26:32 +00:00
93c91ebdbe
* Upgrade Electron to 8, bump Node version, fix font-manager * Specify nodeIntegration as true * Get <webview> working again * Get <webview> working again * Electron 9.0 * Escape parens in plugin install exec path (newer Electron added them) * Bump versions for first alpha * Electron 9.1 * Convert all Electron APIs that switched from callback to Promise * Fix send-and-download feature * Remove user-agent override hack for OAuth 2 login window * Bump alpha version * Fix issue regarding chokidar * Add package-lock.json * Upgrade chokidar because @babel/cli uses an older incompatible version of fsevents * Fix source maps * Read .nvmrc in GitHub actions * Address remaining PR feedback
55 lines
1.3 KiB
JavaScript
55 lines
1.3 KiB
JavaScript
const webpack = require('webpack');
|
|
const baseConfig = require('./webpack.config.base.babel');
|
|
const pkg = require('../package.json');
|
|
|
|
const PORT = pkg.dev['dev-server-port'];
|
|
|
|
module.exports = {
|
|
...baseConfig,
|
|
devtool: 'eval-source-map',
|
|
mode: 'development',
|
|
entry: [
|
|
`webpack-dev-server/client?http://localhost:${PORT}`,
|
|
'webpack/hot/only-dev-server',
|
|
...baseConfig.entry,
|
|
],
|
|
module: {
|
|
...baseConfig.module,
|
|
rules: [
|
|
...baseConfig.module.rules,
|
|
{
|
|
test: /\.js$/,
|
|
enforce: 'pre',
|
|
use: ['source-map-loader'],
|
|
include: [/insomnia-components/],
|
|
},
|
|
],
|
|
},
|
|
output: {
|
|
...baseConfig.output,
|
|
publicPath: '/',
|
|
},
|
|
devServer: {
|
|
host: 'localhost',
|
|
port: PORT,
|
|
publicPath: '/',
|
|
hot: true,
|
|
disableHostCheck: true,
|
|
|
|
// This is needed for source-maps to resolve correctly
|
|
contentBase: '/',
|
|
},
|
|
plugins: [
|
|
...baseConfig.plugins,
|
|
new webpack.LoaderOptionsPlugin({ debug: true }), // Legacy global loader option
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
new webpack.NamedModulesPlugin(),
|
|
new webpack.DefinePlugin({
|
|
__DEV__: true,
|
|
'process.env.NODE_ENV': JSON.stringify('development'),
|
|
'process.env.INSOMNIA_ENV': JSON.stringify('development'),
|
|
}),
|
|
],
|
|
};
|