Welcome to mirror list, hosted at ThFree Co, Russian Federation.

webpack.hot.js - github.com/nextcloud/deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5c8e113b7e73196e23210a6b1f094f093e7a863d (plain)
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
const webpack = require('webpack');
const merge = require('webpack-merge');
const dev = require('./webpack.dev.js');

module.exports = merge(dev, {
	devServer: {
		hot: true,
		port: 3000,
		/**
		 * This makes sure the main entrypoint is written to disk so it is
		 * loaded by Nextcloud though our existing addScript calls
		 */
		writeToDisk: (filePath) => {
			return /deck\.js$/.test(filePath);
		},
		headers: {
			'Access-Control-Allow-Origin': '*'
		}
	},
	plugins: [
		new webpack.DefinePlugin({
			'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
			'process.env.HOT': true
		})
	]
})