Skip to content

Commit

Permalink
fix: revert nextjs bundle location
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 6, 2021
1 parent ad43bea commit aa10bb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
23 changes: 2 additions & 21 deletions integrations/nextjs-plugin/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = ({
const buildConfig: BuildProps = {
...defaultCompileProps,
...{
distFolder,
distFolder: path.resolve(__dirname),
staticFolder: staticFolder || path.join(distFolder, 'static'),
},
...userProps,
Expand Down Expand Up @@ -91,26 +91,7 @@ module.exports = ({
'@emotion/babel-plugin',
);
}
return {
...config,
module: {
...config.module,
rules: [
...(config.module?.rules || []),
{
test: require.resolve('@component-controls/store/controls-store'),
use: {
loader: require.resolve('@component-controls/store/loader.js'),
options: {
bundleFileName: getBundleName(
mergeBuildConfiguration(buildConfig),
),
},
},
},
],
},
};
return config;
},

...rest,
Expand Down
6 changes: 5 additions & 1 deletion integrations/nextjs-plugin/src/store.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { store } from '@component-controls/store/controls-store';
import { Store } from '@component-controls/core';
import { loadStore } from '@component-controls/store';

const bundle = require('./component-controls');
export const store: Store = loadStore(bundle, true);

0 comments on commit aa10bb3

Please sign in to comment.