Skip to content

Commit

Permalink
refactor(docs): replace next-transpile-modules package
Browse files Browse the repository at this point in the history
  • Loading branch information
chanceaclark committed Aug 19, 2024
1 parent f9ca526 commit 63aeebc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-ants-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bigcommerce/docs': patch
---

Replaces the `next-transpile-modules` package with the native built-in Next.js functionality.
17 changes: 8 additions & 9 deletions packages/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
const withTM = require('next-transpile-modules')([
'@bigcommerce/big-design',
'@bigcommerce/big-design-theme',
]);

const bdPkg = require('../big-design/package.json');
const examplesPkg = require('../examples/package.json');

const pkg = require('./package.json');

const isProduction = process.env.NODE_ENV === 'production';
const isDev = !isProduction;
const URL_PREFIX = '/big-design';
const EXAMPLES_VERSION = examplesPkg.version;

module.exports = withTM({
/** @type {import('next').NextConfig} */
module.exports = {
basePath: isProduction ? URL_PREFIX : '',
output: 'export',
env: {
CODE_SANDBOX_URL: `https://codesandbox.io/s/github/bigcommerce/big-design/tree/%40bigcommerce/examples%40${EXAMPLES_VERSION}/packages/examples`,
URL_PREFIX: isProduction ? URL_PREFIX : '',
BD_VERSION: bdPkg.version,
},
transpilePackages: [
'@bigcommerce/big-design',
'@bigcommerce/big-design-theme',
'@bigcommerce/big-design-icons',
],
images: {
unoptimized: true,
},
Expand Down Expand Up @@ -53,4 +52,4 @@ module.exports = withTM({

return rest;
},
});
};
1 change: 0 additions & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@bigcommerce/big-design-theme": "workspace:^",
"@radix-ui/react-scroll-area": "^1.0.5",
"clipboard-copy": "^4.0.1",
"next-transpile-modules": "^10.0.0",
"prettier": "^2.4.0",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
Expand Down
12 changes: 3 additions & 9 deletions pnpm-lock.yaml

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

0 comments on commit 63aeebc

Please sign in to comment.