mirror of
https://github.com/SamEyeBam/animate.git
synced 2025-09-27 22:45:25 +00:00
larry babby and threejs for glsl
This commit is contained in:
59
webGl/my-threejs-test/node_modules/@parcel/runtime-service-worker/lib/ServiceWorkerRuntime.js
generated
vendored
Normal file
59
webGl/my-threejs-test/node_modules/@parcel/runtime-service-worker/lib/ServiceWorkerRuntime.js
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
function _plugin() {
|
||||
const data = require("@parcel/plugin");
|
||||
_plugin = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _utils() {
|
||||
const data = require("@parcel/utils");
|
||||
_utils = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
var _default = exports.default = new (_plugin().Runtime)({
|
||||
apply({
|
||||
bundle,
|
||||
bundleGraph
|
||||
}) {
|
||||
if (bundle.env.context !== 'service-worker') {
|
||||
return [];
|
||||
}
|
||||
let asset = bundle.traverse((node, _, actions) => {
|
||||
if (node.type === 'dependency' && node.value.specifier === '@parcel/service-worker' && !bundleGraph.isDependencySkipped(node.value)) {
|
||||
actions.stop();
|
||||
return bundleGraph.getResolvedAsset(node.value, bundle);
|
||||
}
|
||||
});
|
||||
if (!asset) {
|
||||
return [];
|
||||
}
|
||||
let manifest = [];
|
||||
bundleGraph.traverseBundles(b => {
|
||||
if (b.bundleBehavior === 'inline' || b.id === bundle.id) {
|
||||
return;
|
||||
}
|
||||
manifest.push((0, _utils().urlJoin)(b.target.publicUrl, b.name));
|
||||
});
|
||||
let code = `import {_register} from '@parcel/service-worker';
|
||||
const manifest = ${JSON.stringify(manifest)};
|
||||
const version = ${JSON.stringify(bundle.hashReference)};
|
||||
_register(manifest, version);
|
||||
`;
|
||||
return [{
|
||||
filePath: asset.filePath,
|
||||
code,
|
||||
isEntry: true,
|
||||
env: {
|
||||
sourceType: 'module'
|
||||
}
|
||||
}];
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user