Skip to content

Commit

Permalink
Revert "feat: try module output"
Browse files Browse the repository at this point in the history
This reverts commit 7ff2860.
  • Loading branch information
kellyjosephprice committed Feb 27, 2024
1 parent 7ff2860 commit 6578e02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions processor/transform/reusable-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const type = 'reusable-content';

const regexp = /^\s*<(?<tag>[A-Z]\S+)\s*\/>\s*$/;

function reusableContentTransformer() {
const reusableContentTransformer = function () {
const { tags, disabled } = this.data('reusableContent');
if (disabled) return () => undefined;

Expand All @@ -26,6 +26,6 @@ function reusableContentTransformer() {

return tree;
};
}
};

export default reusableContentTransformer;
13 changes: 5 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ const getConfig = ({ target }) => ({
optimization: {
minimize: false,
},
output: {
library: {
type: 'commonjs2',
},
},
resolve: {
extensions: ['.js', '.json', '.jsx', '.ts', '.tsx'],
},
Expand All @@ -95,11 +100,6 @@ const browserConfig = merge(getConfig({ target: 'web' }), {
umd: 'react-dom',
},
},
output: {
library: {
type: 'module',
},
},
resolve: {
fallback: {
buffer: require.resolve('buffer'),
Expand All @@ -112,9 +112,6 @@ const browserConfig = merge(getConfig({ target: 'web' }), {
const serverConfig = merge(getConfig({ target: 'node' }), {
output: {
filename: '[name].node.js',
library: {
type: 'commonjs2',
},
},
});

Expand Down

0 comments on commit 6578e02

Please sign in to comment.