mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-28 15:33:47 +00:00
feat: add proxy utils esm bundle
This commit is contained in:
1 parent
8ffb62f2d7
commit
52dbecffa1
3 files changed
+25
No files matched your search
@@ -96,6 +96,7 @@ jobs:
|
||||
./backend/dist/sub-store-1.min.js
|
||||
./backend/dist/sub-store-parser.loon.min.js
|
||||
./backend/dist/cron-sync-artifacts.min.js
|
||||
./backend/dist/proxy-utils.esm.mjs
|
||||
./backend/dist/sub-store.bundle.js
|
||||
- name: Git push assets to "release" branch
|
||||
run: |
|
||||
|
||||
@@ -34,6 +34,25 @@ const { build } = require('esbuild');
|
||||
});
|
||||
}
|
||||
|
||||
const browserEsmArtifacts = [
|
||||
{
|
||||
src: 'src/products/proxy-utils.esm.js',
|
||||
dest: 'dist/proxy-utils.esm.mjs',
|
||||
},
|
||||
];
|
||||
|
||||
for await (const artifact of browserEsmArtifacts) {
|
||||
await build({
|
||||
entryPoints: [artifact.src],
|
||||
bundle: true,
|
||||
minify: true,
|
||||
sourcemap: false,
|
||||
platform: 'browser',
|
||||
format: 'esm',
|
||||
outfile: artifact.dest,
|
||||
});
|
||||
}
|
||||
|
||||
let content = fs.readFileSync(path.join(__dirname, 'sub-store.min.js'), {
|
||||
encoding: 'utf8',
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { ProxyUtils } from '@/core/proxy-utils';
|
||||
|
||||
const { parse, produce } = ProxyUtils;
|
||||
|
||||
export { parse, produce };
|
||||
Reference in new issue
Block a user