Skip to content

Commit

Permalink
fix: bundle location for nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jul 20, 2020
1 parent 6e89d30 commit 171e9c9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 19 deletions.
17 changes: 1 addition & 16 deletions integrations/nextjs-plugin/component-controls.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions integrations/nextjs-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"package.json",
"README.md",
"build.js",
"component-controls.js",
"store.js"
],
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion integrations/nextjs-plugin/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { config } from '../../rollup-config';

export default config({
input: ['./src/index.ts', './src/build.ts', './src/store.ts'],
input: [
'./src/index.ts',
'./src/build.ts',
'./src/store.ts',
'./src/component-controls.ts',
],
});
2 changes: 1 addition & 1 deletion integrations/nextjs-plugin/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default ({
};
const options: CompileProps = {
presets: presets || defaultPresets,
distFolder: path.resolve(__dirname, '..'),
distFolder: path.resolve(__dirname),
staticFolder:
staticFolder || path.join(process.cwd(), defaultConfig.distDir),
...userProps,
Expand Down
3 changes: 3 additions & 0 deletions integrations/nextjs-plugin/src/component-controls.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { LoadingStore } from '@component-controls/loader';
const bundle = {} as LoadingStore;
export default bundle;
2 changes: 1 addition & 1 deletion integrations/nextjs-plugin/src/store.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { StoryStore, HMRStore } from '@component-controls/store';
const bundle = require('../component-controls');
const bundle = require('./component-controls');
export const store: StoryStore = new HMRStore(bundle);

0 comments on commit 171e9c9

Please sign in to comment.