Skip to content

Commit

Permalink
[feat] turbopackを導入
Browse files Browse the repository at this point in the history
  • Loading branch information
TkymHrt committed Dec 4, 2024
1 parent 3690f4f commit 0963ef9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion view-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
32 changes: 21 additions & 11 deletions view-user/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
};

Expand Down
2 changes: 1 addition & 1 deletion view-user/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0963ef9

Please sign in to comment.