Skip to content

修复 CI #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ workflows:
version: 2
build:
jobs:
- build_node_8
- build_node_10
- build_node_12
- build_node_14
- build_node_16

version: 2
jobs:
base: &base
working_directory: ~/workspace
docker:
- image: circleci/node:8.16.1
- image: cimg/node:12.18.2
steps:
- checkout
- restore_cache:
Expand All @@ -28,17 +28,17 @@ jobs:
paths:
- "node_modules"

build_node_8:
build_node_12:
<<: *base
docker:
- image: circleci/node:8.16.1
- image: cimg/node:12.18.2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is designed to supercede the legacy CircleCI Node.js image, circleci/node.

https://circleci.com/developer/images/image/cimg/node


build_node_10:
build_node_14:
<<: *base
docker:
- image: circleci/node:10.16.3
- image: cimg/node:14.17.0

build_node_12:
build_node_16:
<<: *base
docker:
- image: circleci/node:12.18.2
- image: cimg/node:16.1.0
2 changes: 2 additions & 0 deletions build-samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -o errexit

npm run build

sudo npm link

sudo chown -R circleci samples
Expand Down
6 changes: 3 additions & 3 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion src/webpack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,19 @@ export async function getConfig(): Promise<Configuration> {
getEnv() === Env.Prod
? buildConfig.publicUrl
: getPathFromUrl(buildConfig.publicUrl)
)
),
environment: {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// 这里控制 webpack 本身的运行时代码(而不是业务代码),
// 对于语言 feature 先全部配合不支持,以确保 webpack 会产出兼容性最好的代码;
// TODO: 后续考虑通过使用 build config 中的 targets.browsers 来挨个判断是否支持
arrowFunction: false,
bigIntLiteral: false,
const: false,
destructuring: false,
dynamicImport: false,
forOf: false,
module: false
}
},
optimization: {
minimizer: [
Expand Down