Revised webpack bundling and updated worker loading, turned inline worker on by default.

pull/2/head
Taloth Saldono 5 years ago committed by Qstick
parent 9c3b4e3025
commit 3e3b2a7784

@ -10,8 +10,7 @@ gulp.task('build',
'webpack',
'copyHtml',
'copyFonts',
'copyImages',
'copyJs'
'copyImages'
)
)
);

@ -5,17 +5,6 @@ const cache = require('gulp-cached');
const livereload = require('gulp-livereload');
const paths = require('./helpers/paths.js');
gulp.task('copyJs', () => {
return gulp.src(
[
path.join(paths.src.root, 'polyfills.js')
], { base: paths.src.root })
.pipe(cache('copyJs'))
.pipe(print())
.pipe(gulp.dest(paths.dest.root))
.pipe(livereload());
});
gulp.task('copyHtml', () => {
return gulp.src(paths.src.html, { base: paths.src.root })
.pipe(cache('copyHtml'))

@ -13,6 +13,7 @@ const frontendFolder = path.join(__dirname, '..');
const srcFolder = path.join(frontendFolder, 'src');
const isProduction = process.argv.indexOf('--production') > -1;
const isProfiling = isProduction && process.argv.indexOf('--profile') > -1;
const inlineWebWorkers = true;
const distFolder = path.resolve(frontendFolder, '..', '_output', uiFolder);
@ -121,7 +122,9 @@ const config = {
use: {
loader: 'worker-loader',
options: {
name: '[name].js'
name: '[name].js',
inline: inlineWebWorkers,
fallback: !inlineWebWorkers
}
}
},

@ -79,6 +79,5 @@
</body>
<script src="/initialize.js" data-no-hash></script>
<script src="/polyfills.js"></script>
<!-- webpack bundles body -->
</html>

@ -1,4 +1,6 @@
import './preload.js';
import './preload';
import './polyfills';
import React from 'react';
import { render } from 'react-dom';
import { createBrowserHistory } from 'history';

Loading…
Cancel
Save