Files
KaTeX/webpack.dev.js
renovate[bot] 16a34c3b35 chore(deps): update dependency flow-bin to v0.134.0 [skip netlify] (#2533)
* chore(deps): update dependency flow-bin to v0.134.0 [skip netlify]

* Fix flow errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Young Min Kin <mail@ylem.kim>
2020-09-26 12:19:42 +09:00

31 lines
1.0 KiB
JavaScript

// @flow
const {targets, createConfig} = require('./webpack.common');
const path = require('path');
const PORT = 7936;
// dev minify
const katexConfig /*: Object*/ = createConfig(targets.shift(), true, false);
// add the entry point for test page
katexConfig.entry.main = './static/main.js';
// only the `devServer` options for the first configuration will be taken
// into account and used for all the configurations in the array.
katexConfig.devServer = {
contentBase: [path.join(__dirname, 'static'), __dirname],
// Allow server to be accessed from anywhere, which is useful for
// testing. This potentially reveals the source code to the world,
// but this should not be a concern for testing open-source software.
disableHostCheck: true,
host: '0.0.0.0',
port: PORT,
stats: {
colors: true,
},
};
module.exports = ([
katexConfig,
...targets.map(target => createConfig(target, true, false)),
] /*: Array<Object> */);