Skip to content

Commit

Permalink
remove in turbopack and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed May 13, 2024
1 parent 0efdfb1 commit 56d5c21
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 23 deletions.
1 change: 0 additions & 1 deletion packages/next-swc/crates/next-api/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ impl Project {
// need to confirm what we'll do with turbopack.
let config = self.next_config();

emit_event("swcMinify", *config.swc_minify().await?);
emit_event(
"skipMiddlewareUrlNormalize",
*config.skip_middleware_url_normalize().await?,
Expand Down
7 changes: 0 additions & 7 deletions packages/next-swc/crates/next-core/src/next_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ pub struct NextConfig {
public_runtime_config: IndexMap<String, serde_json::Value>,
server_runtime_config: IndexMap<String, serde_json::Value>,
static_page_generation_timeout: f64,
swc_minify: Option<bool>,
target: Option<String>,
typescript: TypeScriptConfig,
use_file_system_public_routes: bool,
Expand Down Expand Up @@ -535,7 +534,6 @@ pub struct ExperimentalConfig {
server_minification: Option<bool>,
/// Enables source maps generation for the server production bundle.
server_source_maps: Option<bool>,
swc_minify: Option<bool>,
swc_trace_profiling: Option<bool>,
/// @internal Used by the Next.js internals only.
trust_host_header: Option<bool>,
Expand Down Expand Up @@ -970,11 +968,6 @@ impl NextConfig {
))
}

#[turbo_tasks::function]
pub async fn swc_minify(self: Vc<Self>) -> Result<Vc<bool>> {
Ok(Vc::cell(self.await?.swc_minify.unwrap_or(false)))
}

#[turbo_tasks::function]
pub async fn skip_middleware_url_normalize(self: Vc<Self>) -> Result<Vc<bool>> {
Ok(Vc::cell(
Expand Down
7 changes: 0 additions & 7 deletions test/development/basic/__snapshots__/next-rs-api.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ exports[`next.rs api should detect the correct routes: diagnostics 1`] = `
"swcImportSource": "false",
},
},
{
"category": "NextFeatureTelemetry_category_tbd",
"name": "EVENT_BUILD_FEATURE_USAGE",
"payload": {
"swcMinify": "true",
},
},
{
"category": "NextFeatureTelemetry_category_tbd",
"name": "EVENT_BUILD_FEATURE_USAGE",
Expand Down
1 change: 0 additions & 1 deletion test/integration/telemetry/next.config.swc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = {
swcMinify: true,
compiler: {
relay: {
// This should match relay.config.js
Expand Down
4 changes: 0 additions & 4 deletions test/integration/telemetry/test/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ describe('config telemetry', () => {
featureName: 'swcLoader',
invocationCount: 1,
},
{
featureName: 'swcMinify',
invocationCount: 1,
},
{
featureName: 'swcRelay',
invocationCount: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { nextTestSetup } from 'e2e-utils'
describe('terser-class-static-blocks', () => {
const { next } = nextTestSetup({
files: __dirname,
nextConfig: {
swcMinify: false,
},
nextConfig: {},
})

it('should work using cheerio', async () => {
Expand Down

0 comments on commit 56d5c21

Please sign in to comment.