After researching Webpack and checking similar posts on stackoverflow, I'm still struggling to add additional files to my bundle. Currently, I've successfully included my js modules in the bundle.js file, but now I want to incorporate other files as well:
<script src="~/Scripts/jquery-3.2.1.js"></script>
<script src="~/Scripts/dx.all.js"></script>
<script src="~/Scripts/go-1.7.11.js"></script>
How can I achieve this using an import clause? Should I include them in the entry .ts file or in the webpack.config.js file?
I attempted the following approach, but it didn't work as expected:
In the entry .ts file:
import './../Scripts/jquery-3.2.1.js';
import './../Scripts/dx.all.debug.js';
import './../Scripts/go-1.7.11.js';
import { Caller } from './Caller';
window.onload = () => {
let caller: Caller = new Caller();
caller.execute();
};
UPDATE:
1) Changes made to webpack.config.js:
module.exports = {
entry: './Main.js',
output: {
filename: 'bundle.js'
}
};
2) All additional .js files are located in the same folder as the Main.js file.