My project depends on react and mxGraph, and i am using webpack as bundle tool. Currently i am building react using webpack and manually including <script type="text/javascript" src="js/mxGraph/mxClient.js"></script>
in index.html file. Now i want to concat/add mxClient.js file content to bundle.js file generated by webpack.
我的项目取决于react和mxGraph,我使用webpack作为捆绑工具。目前我正在使用webpack构建反应并在index.html文件中手动包含
index.js
var React = require('react'),
ReactDOM = require('react-dom');
window.React = React;
window.ReactDOM = ReactDOM;
this generates bundle.js file with react deps to this i want to add/append mxClient.js content to bundle.js via webpack
这会生成带有react deps的bundle.js文件,我希望通过webpack将mxClient.js内容添加/附加到bundle.js
1 个解决方案
#1
0
It looks like the answer is in the comments: http://webpack.github.io/docs/shimming-modules.html
看起来答案在评论中:http://webpack.github.io/docs/shimming-modules.html
#1
0
It looks like the answer is in the comments: http://webpack.github.io/docs/shimming-modules.html
看起来答案在评论中:http://webpack.github.io/docs/shimming-modules.html