Remove source maps and adjust targets
This commit is contained in:
parent
b64bbc8132
commit
c3e0cb5a46
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"presets": ["es2015"]
|
||||
}
|
|
@ -10,7 +10,6 @@ module.exports = function (api) {
|
|||
loose: true,
|
||||
spec: false,
|
||||
modules: "auto",
|
||||
// debug: true
|
||||
},
|
||||
],
|
||||
];
|
||||
|
|
|
@ -4,18 +4,24 @@ module.exports = function (api) {
|
|||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
targets: "android >= 4.4.4",
|
||||
targets: "cover 99.5%",
|
||||
useBuiltIns: "usage",
|
||||
corejs: 3,
|
||||
loose: true,
|
||||
spec: false,
|
||||
modules: "auto",
|
||||
// debug: true
|
||||
},
|
||||
],
|
||||
];
|
||||
const plugins = [
|
||||
"closure-elimination",
|
||||
// var is faster than let and const!
|
||||
[
|
||||
"@babel/plugin-transform-block-scoping",
|
||||
{
|
||||
throwIfClosureRequired: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
"@babel/plugin-transform-classes",
|
||||
{
|
||||
|
|
|
@ -61,7 +61,8 @@ module.exports = ({
|
|||
// Display bailout reasons
|
||||
optimizationBailout: true,
|
||||
},
|
||||
devtool: "source-map",
|
||||
// devtool: "source-map",
|
||||
devtool: false,
|
||||
resolve: {
|
||||
alias: {
|
||||
"global-compression": path.resolve(__dirname, "..", "src", "js", "core", "lzstring.js"),
|
||||
|
@ -85,7 +86,7 @@ module.exports = ({
|
|||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
sourceMap: false,
|
||||
cache: false,
|
||||
terserOptions: {
|
||||
ecma: es6 ? 6 : 5,
|
||||
|
@ -178,6 +179,10 @@ module.exports = ({
|
|||
patterns: ["../src/js/**/*.js"],
|
||||
}),
|
||||
|
||||
// new webpack.SourceMapDevToolPlugin({
|
||||
// filename: "[name].map",
|
||||
// publicPath: "/v/" + utils.getRevision() + "/",
|
||||
// }),
|
||||
// new ReplaceCompressBlocks()
|
||||
// new webpack.optimize.ModuleConcatenationPlugin()
|
||||
// new WebpackDeepScopeAnalysisPlugin()
|
||||
|
@ -242,13 +247,23 @@ module.exports = ({
|
|||
},
|
||||
{
|
||||
test: /\.worker\.js$/,
|
||||
use: {
|
||||
loader: "worker-loader",
|
||||
options: {
|
||||
fallback: false,
|
||||
inline: true,
|
||||
use: [
|
||||
{
|
||||
loader: "worker-loader",
|
||||
options: {
|
||||
fallback: false,
|
||||
inline: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: "babel-loader?cacheDirectory",
|
||||
options: {
|
||||
configFile: require.resolve(
|
||||
es6 ? "./babel-es6.config.js" : "./babel.config.js"
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.md$/,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// We clamp high deltas so 30 fps is fairly ok
|
||||
const bgFps = 30;
|
||||
const desiredMsDelay = 1000 / bgFps;
|
||||
var bgFps = 30;
|
||||
var desiredMsDelay = 1000 / bgFps;
|
||||
|
||||
let lastTick = 0;
|
||||
|
||||
function tick() {
|
||||
const now = performance.now();
|
||||
const delta = now - lastTick;
|
||||
var now = performance.now();
|
||||
var delta = now - lastTick;
|
||||
lastTick = now;
|
||||
|
||||
// @ts-ignore
|
||||
|
|
Reference in New Issue