Skip to content

Commit 3ae9020

Browse files
committed
feat: provide datasets in json, csv, xlsx
1 parent 9f6d586 commit 3ae9020

File tree

13 files changed

+1258
-86
lines changed

13 files changed

+1258
-86
lines changed

.storybook/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ module.exports = {
111111
config.resolve.alias = {};
112112
}
113113

114+
// [IMPORTANT] We wanted to use the node version for `main` and the browser for `docs` but we had issues using just an alias with default name as origin
115+
// so we changed to a `xxx-proxy` but then the `TypeScript is unable to find the module with right `paths` settings in `tsconfig.json`
116+
// so definitely giving up the optimization and using the ESM browser also for the node version
117+
// // Needed to make the CSV node library working in the browser
118+
// // We tried to do `csv-parse --> csv-parse/browser/esm` but it does not work, maybe because it's the same prefix... so we use a suffix `-proxy`
119+
// config.resolve.alias['csv-parse-proxy'] = 'csv-parse/browser/esm';
120+
// config.resolve.alias['csv-stringify-proxy'] = 'csv-stringify/browser/esm';
121+
114122
config.resolve.plugins = [
115123
new TsconfigPathsPlugin({
116124
configFile: path.resolve(__dirname, '../tsconfig.json'),

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ const moduleExports = async () => {
8686
source: '/sitemap/:reference.xml',
8787
destination: '/api/sitemap/:reference',
8888
},
89+
{
90+
source: '/dataset/initiatives.:filetype',
91+
destination: '/api/dataset/initiatives?filetype=:filetype',
92+
},
8993
];
9094
},
9195
images: {

0 commit comments

Comments
 (0)