Skip to content

Commit

Permalink
Revert "fix: Retain index files in dist output to match declarations (#…
Browse files Browse the repository at this point in the history
…1665)"

This reverts commit 32fc4e3.
  • Loading branch information
amannn committed Jan 17, 2025
1 parent 32fc4e3 commit bb49880
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 85 deletions.
1 change: 0 additions & 1 deletion packages/next-intl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
"eslint": "^9.11.1",
"eslint-config-molindo": "^8.0.0",
"eslint-plugin-react-compiler": "0.0.0-experimental-8e3b87c-20240822",
"glob": "^11.0.1",
"next": "^14.2.4",
"path-to-regexp": "^6.2.2",
"prettier": "^3.3.3",
Expand Down
10 changes: 1 addition & 9 deletions packages/next-intl/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import preserveDirectives from 'rollup-plugin-preserve-directives';
import {getBuildConfig} from 'tools';
import pkg from './package.json' with {type: 'json'};
import {glob} from 'glob';

function rewriteBundle(regex, replaceFn) {
return {
Expand Down Expand Up @@ -31,14 +30,7 @@ export default [
middleware: 'src/middleware.tsx',
routing: 'src/routing.tsx',
plugin: 'src/plugin.tsx',
config: 'src/config.tsx',

// Workaround for https://github.com/rollup/rollup/issues/3916
// See https://x.com/jamannnnnn/status/1880199734280732841
...glob.sync('src/**/index.tsx').reduce((acc, file) => {
acc[file.replace('src/', '').replace('/index.tsx', '/index')] = file;
return acc;
}, {})
config: 'src/config.tsx'
},
external: [
...Object.keys(pkg.dependencies),
Expand Down
Loading

0 comments on commit bb49880

Please sign in to comment.