@ HackSoft Conf 2017
Martin Angelov
- Alexandre Dumas, The Three Musketeers
but do it with responsibility
<script src="jquery.min.js"></script>
<script src = "jquery.debug.js"></script>
<script src="main.js"></script>
var path = require('path');
*And that is the best part learning one thing - you learn a lot more every time!
is used to define which is/are the main file/files of you application.
entry: [
'babel-polyfill',
'./path/to/index.jsx'
]
entry: [
'./path/to/ComponentA.jsx',
'./path/to/ComponentB.jsx',
'./path/to/ComponentC.jsx'
]
TC-acquire
TC-colab
is used to define where you want you app to be bundled. You can specify several files buy in most cases you will give just one file:
output: {
path: configDirs.BUILD_DIR,
filename: 'bundle.js',
publicPath: '/'
},
output: {
filename: config.DIST_DIR + '/react/[name].js',
sourceMapFilename: config.DIST_DIR + '/react/[name].js.map'
},
TC-acquire
TC-colab
are used to perform some custom actions on your bundled modules. As loaders, they have to be installed in you node_modules/ in order to be used.