Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
src/ServiceWorker.ts
/node_modules
next.config.js
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ module.exports = {
rules: {
'@typescript-eslint/dot-notation': 0,
'no-plusplus': 0,
// suppress errors for missing 'import React' in files
'react/react-in-jsx-scope': 'off',
// allow jsx syntax in js files (for next.js project)
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
},
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
.env.test.local
.env.production.local
.env
.next

npm-debug.log*
yarn-debug.log*
Expand Down
2 changes: 2 additions & 0 deletions 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" />
51 changes: 51 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
const withPlugins = require('next-compose-plugins');
const withImages = require('next-images')
const withTranspile = require('next-transpile-modules');
// const withTs = require('next-typescript')
// module.exports.withImages = withImages;
// module.exports.withTranspile = withTranspile;
module.exports = withPlugins(
[
[withTranspile,
{
resolveSymlinks: true,
transpileModules: ["ol"],

},
],
withImages,
{
webpack(config, options) {
const { dir, defaultLoaders } = options
config.resolve.extensions.push('.ts', '.tsx')
config.module.rules.push({
test: /\\.+(ts|tsx)$/,
include: [dir],
exclude: /node_modules/,
use: [
defaultLoaders.babel,
{ loader: 'ts-loader', options: { transpileOnly: true } }
]
})
config.node= {
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
...config.node,
fs: 'empty',
child_process : 'empty',
net : 'empty',
tls: 'empty',
}
return config
}
},

],
{
env: {
//setup environmnet variables here or seperate file
}
}


)
Loading