Skip to content

Commit

Permalink
Migrate _enonicAdapter to NPM #110
Browse files Browse the repository at this point in the history
Migrated to npm published nextjs-adapter.
Added `next-transpile-modules` to transpile jsx files from the external libs like the new adapter (used in `next.config.js`).
  • Loading branch information
edloidas committed Nov 15, 2022
1 parent 5f2ac78 commit 28b2fec
Show file tree
Hide file tree
Showing 34 changed files with 498 additions and 2,532 deletions.
8 changes: 5 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const withTM = require('next-transpile-modules')(['@enonic/nextjs-adapter']);

// neededed to eval inline react scripts
const cspHeaders = [
{
Expand All @@ -6,8 +8,8 @@ const cspHeaders = [
}
]

module.exports = {
reactStrictMode: true,
module.exports = withTM({
reactStrictMode: false,

async headers() {
return [
Expand All @@ -18,4 +20,4 @@ module.exports = {
},
]
},
}
});
86 changes: 86 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
"lint": "npx next lint"
},
"dependencies": {
"@enonic/nextjs-adapter": "0.0.1-alpha.6",
"html-react-parser": "^3.0.4",
"next": "^13.0.3",
"next-transpile-modules": "^10.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"unescape": "^1.0.1"
},
"devDependencies": {
"@types/node": "^18.11.8",
"@types/next": "^9.0.0",
"@types/node": "^18.11.8",
"@types/react": "18.0.25",
"@types/react-dom": "^18.0.8",
"eslint": "8.26.0",
Expand Down
183 changes: 0 additions & 183 deletions src/_enonicAdapter/ComponentRegistry.ts

This file was deleted.

Loading

0 comments on commit 28b2fec

Please sign in to comment.