Skip to content

Commit c8d1bc4

Browse files
committed
fix: distribute pre-bundled core builds
1 parent a7f54cc commit c8d1bc4

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
"test:real": "cross-env REAL_BACKEND=1 npm run test:node",
1616
"docs": "jsdoc src README.md package.json -d docs -c .jsdocrc.json",
1717
"build:cjs": "babel src --out-dir dist/cjs",
18+
"build:core": "cross-env webpack --config webpack/core.js",
1819
"build:browser": "cross-env CLIENT_PLATFORM=Browser webpack --config webpack/browser.js",
1920
"build:weapp": "cross-env CLIENT_PLATFORM=Weapp webpack --config webpack/weapp.js",
20-
"build": "rimraf dist && npm run build:cjs && npm run build:browser && npm run build:weapp && npm run build:live-query",
21-
"build:live-query": "export LIVE_QUERY=1 && npm run build:browser && npm run build:weapp",
21+
"build:platforms": "npm run build:core && npm run build:browser && npm run build:weapp",
22+
"build": "rimraf dist && npm run build:cjs && npm run build:platforms && cross-env LIVE_QUERY=1 npm run build:platforms",
2223
"prepublishOnly": "./script/check-version.js"
2324
},
2425
"dependencies": {

webpack/core.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { create, name } = require('./common');
2+
3+
const config = create();
4+
5+
const entry = process.env.LIVE_QUERY
6+
? './src/entry/core-live-query.js'
7+
: './src/entry/core.js';
8+
9+
config.entry = {
10+
[`${name}-core`]: entry,
11+
[`${name}-core-min`]: entry,
12+
};
13+
14+
module.exports = config;

0 commit comments

Comments
 (0)