Sunday, May 28, 2017

Webpack typescript compile without webpackJsonp

Leave a Comment

Is it possible to use webpack for packing without using webpack module loading?

I have an app that can use everything of webpack and next to this app I have a small typescript file test.ts that should be compiled, minified, etc. But the output should be a simple js file that is not wrapped into webpackJsonp. Is is adding wayyyy too much overhead (96kb) for just a few lines that have no external dependency.

test.ts

alert('foo'); 

test.js is

webpackJsonp([1],{ /***/ 0: /***/ function(module, exports, __webpack_require__) {      __webpack_require__(1);     __webpack_require__(75);     module.exports = __webpack_require__(105);  /***/ },  /***/ 105: /***/ function(module, exports) {      "use strict";     alert('test');  /***/ } }); 

test.js should

alert('foo'); 

I try to keep one ecosystem (webpack) to build.

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment