Skip to content

Commit

Permalink
adding updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
charliewilco committed Dec 24, 2019
1 parent 0e88ec3 commit 8a6a6ef
Show file tree
Hide file tree
Showing 5 changed files with 2,787 additions and 1,513 deletions.
2 changes: 2 additions & 0 deletions documentation/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
44 changes: 10 additions & 34 deletions documentation/next.config.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,20 @@
const { PHASE_PRODUCTION_SERVER } =
process.env.NODE_ENV === 'development'
? {}
: !process.env.NOW_REGION
? require('next/constants')
: require('next-server/constants');

const raw = {
test: /\.txt$/,
use: 'raw-loader'
};

const withMDX = require('@next/mdx')();
const withCSS = require('@zeit/next-css');

const webpack = config => {
config.module.rules.push(raw);
return config;
};

module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_PRODUCTION_SERVER) {
// Config used to run in production.

return {
pageExtensions: ['js', 'jsx', 'mdx'],
webpack
};
}
// ✅ Put the require call here.

const withCSS = require('@zeit/next-css');
const withTypescript = require('@zeit/next-typescript');
const withMDX = require('@zeit/next-mdx')({
extension: /\.mdx?$/
});

return withTypescript(
withCSS(
withMDX({
target: 'serverless',
pageExtensions: ['js', 'jsx', 'mdx'],
webpack
})
)
);
};
module.exports = withCSS(
withMDX({
target: 'serverless',
pageExtensions: ['tsx', 'js', 'jsx', 'mdx'],
webpack
})
);
15 changes: 6 additions & 9 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,26 @@
"build": "next build",
"types": "tsc --noEmit"
},
"babel": {
"presets": ["next/babel", "@zeit/next-typescript/babel"]
},
"dependencies": {
"@mdx-js/loader": "^1.5.3",
"@mdx-js/mdx": "^0.15.5",
"@mdx-js/tag": "^0.15.0",
"@next/mdx": "^9.1.6",
"@zeit/next-css": "^1.0.1",
"@zeit/next-mdx": "^1.2.0",
"@zeit/next-typescript": "^1.1.1",
"classnames": "^2.2.6",
"next": "^8.1.0",
"next": "^9.1.6",
"obsidian.css": "^3.1.0",
"pretty": "^2.0.0",
"prism-themes": "^1.0.1",
"prismjs": "^1.15.0",
"raw-loader": "^2.0.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-ga": "^2.5.3",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-ga": "^2.7.0",
"react-prism": "^4.3.2"
},
"devDependencies": {
"@types/next": "^8.0.4",
"@types/node": "^10.11.7",
"@types/react": "^16.8.14",
"@types/react-dom": "^16.8.4",
Expand Down
13 changes: 10 additions & 3 deletions documentation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compileOnSave": false,
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"module": "esnext",
"jsx": "preserve",
"allowJs": true,
"resolveJsonModule": true,
Expand All @@ -15,6 +15,13 @@
"sourceMap": true,
"skipLibCheck": true,
"baseUrl": ".",
"lib": ["dom", "es2016"]
}
"lib": ["dom", "es2016"],
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"isolatedModules": true
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}
Loading

0 comments on commit 8a6a6ef

Please sign in to comment.