fix: external peers
This commit is contained in:
parent
9564c81a23
commit
0237cf5318
|
@ -1,10 +1,9 @@
|
|||
const react = require('@neutrinojs/react');
|
||||
const { library } = require('webpack');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
|
||||
const config = require('./.neutrinorc');
|
||||
|
||||
module.exports = ({name, files}, clientMains) => {
|
||||
module.exports = ({name, files, peerDependencies}, clientMains) => {
|
||||
const mains = files
|
||||
.filter((file) => file.match(/\.js$/))
|
||||
.map((file) => file.slice(0, -3))
|
||||
|
@ -37,9 +36,11 @@ module.exports = ({name, files}, clientMains) => {
|
|||
.library(name)
|
||||
.libraryTarget('umd')
|
||||
.umdNamedDefine(true);
|
||||
neutrino.config.externals({
|
||||
'@latus/core/virtual': '@latus/core/virtual',
|
||||
});
|
||||
if (peerDependencies) {
|
||||
neutrino.config.externals(
|
||||
Object.keys(peerDependencies).reduce((r, path) => ({...r, [path]: path}), {}),
|
||||
);
|
||||
}
|
||||
};
|
||||
clientConfig.use.push((neutrino) => {
|
||||
neutrino.config.node.set('Buffer', true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user