Browse Source

(commit before) fixed changing profile (#4119)

Include source maps
master
morethanwords 4 years ago
parent
commit
14a469c556
  1. 13
      server.js
  2. 6
      src/config/debug.ts
  3. 2
      webpack.prod.js

13
server.js

@ -22,9 +22,12 @@ app.get('/', (req, res) => { @@ -22,9 +22,12 @@ app.get('/', (req, res) => {
const server = useHttp ? http : https;
server.createServer({
key: fs.readFileSync(__dirname + '/certs/server-key.pem'),
cert: fs.readFileSync(__dirname + '/certs/server-cert.pem')
}, app).listen(port, () => {
let options = {};
if(!useHttp) {
options.key = fs.readFileSync(__dirname + '/certs/server-key.pem');
options.cert = s.readFileSync(__dirname + '/certs/server-cert.pem');
}
server.createServer(options, app).listen(port, () => {
console.log('Listening port:', port, 'folder:', publicFolderName);
});
});

6
src/config/debug.ts

@ -8,11 +8,11 @@ import Modes from "./modes"; @@ -8,11 +8,11 @@ import Modes from "./modes";
export const DEBUG = process.env.NODE_ENV !== 'production' || Modes.debug;
const ctx: any = typeof(window) !== 'undefined' ? window : self;
export const MOUNT_CLASS_TO: any = DEBUG/* && false */ ? ctx : {};
export const MOUNT_CLASS_TO: any = DEBUG || true/* && false */ ? ctx : {};
export default DEBUG;
//let m = DEBUG;
if(!DEBUG/* || true */) {
/* if(!DEBUG) {
ctx.sandpitTurtle = () => {
//if(!m) {
for(let i in MOUNT_CLASS_TO) {
@ -23,7 +23,7 @@ if(!DEBUG/* || true */) { @@ -23,7 +23,7 @@ if(!DEBUG/* || true */) {
//DEBUG = !DEBUG;
};
}
} */
/* export const superDebug = (object: any, key: string) => {
var d = object[key];

2
webpack.prod.js

@ -15,6 +15,8 @@ const buildDir = __dirname + '/public/'; @@ -15,6 +15,8 @@ const buildDir = __dirname + '/public/';
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
optimization: {
//minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})],
//runtimeChunk: 'single',

Loading…
Cancel
Save