Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Fix webpack build of importer/exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed Nov 15, 2018
1 parent 6f80210 commit f313e40
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,22 +207,18 @@ if (appExportType === 'exporter' || appExportType === 'importer') {
};
var globalName = 'MediumDraft' + appExportType[0].toUpperCase() + appExportType[1] + 'porter';
options.output.library = globalName
options.externals.push({
'react-dom/server': {
root: 'ReactDOMServer',
commonjs2: 'react-dom/server',
commonjs: 'react-dom/server',
amd: 'react-dom/server'
}
});
options.externals.push({
'draft-convert': {
root: 'DraftConvert',
commonjs2: 'draft-convert',
commonjs: 'draft-convert',
amd: 'draft-convert'
}
});
options.externals['react-dom/server'] = {
root: 'ReactDOMServer',
commonjs2: 'react-dom/server',
commonjs: 'react-dom/server',
amd: 'react-dom/server'
};
options.externals['draft-convert']= {
root: 'DraftConvert',
commonjs2: 'draft-convert',
commonjs: 'draft-convert',
amd: 'draft-convert'
};
}

module.exports = options;

0 comments on commit f313e40

Please sign in to comment.