Skip to content
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

ci: fix webpack 5 enabling for tests #21436

Merged
merged 4 commits into from Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -160,7 +160,7 @@ jobs:
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
HEADLESS: true
NEXT_WEBPACK5: 1
NEXT_PRIVATE_TEST_WEBPACK5_MODE: 1

steps:
- uses: actions/checkout@v2
Expand All @@ -174,7 +174,7 @@ jobs:
- run: yarn install --check-files
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}

- run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx,worker-loader}/test/index.test.js test/acceptance/*.test.js
- run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs-only' }}

testLegacyReact:
Expand Down
6 changes: 1 addition & 5 deletions packages/next/build/webpack-config.ts
Expand Up @@ -204,11 +204,7 @@ export default async function getBaseWebpackConfig(
rewrites: Rewrite[]
}
): Promise<webpack.Configuration> {
initWebpack(
config.future?.webpack5 ||
(config.future?.webpack5 !== false &&
Number(process.env.NEXT_WEBPACK5) > 0)
)
initWebpack(!!config.future?.webpack5)

let plugins: PluginMetaData[] = []
let babelPresetPlugins: { dir: string; config: any }[] = []
Expand Down
2 changes: 1 addition & 1 deletion packages/next/next-server/server/config.ts
Expand Up @@ -91,7 +91,7 @@ const defaultConfig: NextConfig = {
future: {
strictPostcssConfiguration: false,
excludeDefaultMomentLocales: false,
webpack5: false,
webpack5: Number(process.env.NEXT_PRIVATE_TEST_WEBPACK5_MODE) > 0,
},
serverRuntimeConfig: {},
publicRuntimeConfig: {},
Expand Down