From 0963ef9534a032b86b1b0df2afb834ad1c11f7b8 Mon Sep 17 00:00:00 2001 From: TkymHrt <23.h.takayama.nutfes@gmail.com> Date: Wed, 4 Dec 2024 17:19:50 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20turbopack=E3=82=92=E5=B0=8E=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-admin/package.json | 2 +- view-user/next.config.js | 32 +++++++++++++++++++++----------- view-user/package.json | 2 +- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/view-admin/package.json b/view-admin/package.json index 3e4497e..ef93121 100755 --- a/view-admin/package.json +++ b/view-admin/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev --turbo", "build": "next build", "start": "next start", "lint": "next lint", diff --git a/view-user/next.config.js b/view-user/next.config.js index e30833c..1cb8fc6 100755 --- a/view-user/next.config.js +++ b/view-user/next.config.js @@ -26,19 +26,29 @@ const nextConfig = { ], disableStaticImages: true, }, - webpack: (config) => { - config.module.rules.push({ - test: /\.svg$/, - use: [ - { - loader: "@svgr/webpack", - options: { - svgo: false, - }, + experimental: { + turbo: { + rules: { + "*.svg": { + loaders: ["@svgr/webpack"], + as: "*.js", }, + }, + resolveAlias: { + underscore: "lodash", + mocha: { browser: "mocha/browser-entry.js" }, + }, + resolveExtensions: [ + ".mdx", + ".tsx", + ".ts", + ".jsx", + ".js", + ".mjs", + ".json", ], - }); - return config; + moduleIdStrategy: "deterministic", + }, }, }; diff --git a/view-user/package.json b/view-user/package.json index 0a5dd1a..f475b1d 100755 --- a/view-user/package.json +++ b/view-user/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev --turbo", "build": "next build", "start": "next start", "lint": "next lint",