Browse Source

(commit before) fixed changing profile (#4119)

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

11
server.js

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

6
src/config/debug.ts

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

2
webpack.prod.js

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

Loading…
Cancel
Save