Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Exclude React from library build.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Mar 20, 2019
1 parent e7b3c21 commit e3c0c8e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion webpack/webpack.lib.config.js
@@ -1,16 +1,23 @@
/*
Exports only @solid/react itself, expecting:
- global.React to be react
- global.PropTypes to be prop-types
- global.solid.auth to be solid-auth-client
- global.solid.data to be @solid/query-ldflex
*/

const extendConfig = require('./webpack.common.config');

module.exports = extendConfig('./dist', (outputDir, common) => ({
module.exports = extendConfig('./dist', (outputDir, { externals, ...common }) => ({
...common,
output: {
path: outputDir,
filename: '[name].js',
library: ['solid', 'react'],
},
externals: {
...externals,
'react': 'React',
'prop-types': 'PropTypes',
},
}));

0 comments on commit e3c0c8e

Please sign in to comment.