Skip to content

Commit

Permalink
feat: skip writing dynamic publicPath if publicPath is in output opti…
Browse files Browse the repository at this point in the history
…ons (#31)
  • Loading branch information
DylanPiercey authored Mar 15, 2020
1 parent 677127c commit 6d117c9
Show file tree
Hide file tree
Showing 20 changed files with 353 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/basic-template-plugin-custom-runtime-id/test.marko?dependencies");

const { init } = __webpack_require__(/*! marko/components */ "marko/components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function renderAssets() {
this.end = this.___end;

if (assets) {
this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);
__webpack_require__.p && this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);

if (assets.js) {
const setNonce = nonce && `.setAttribute("nonce", ${JSON.stringify(nonce)})`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/basic-template-plugin/test.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function renderAssets() {
this.end = this.___end;

if (assets) {
this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);
__webpack_require__.p && this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);

if (assets.js) {
const setNonce = nonce && `.setAttribute("nonce", ${JSON.stringify(nonce)})`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ __webpack_require__(/*! ./components/shared.marko?dependencies */ "./src/__tests
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./bar.marko?dependencies */ "./src/__tests__/fixtures/multiple-entries-plugin/bar.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ __webpack_require__(/*! ./components/shared.marko?dependencies */ "./src/__tests
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./foo.marko?dependencies */ "./src/__tests__/fixtures/multiple-entries-plugin/foo.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function renderAssets() {
this.end = this.___end;

if (assets) {
this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);
__webpack_require__.p && this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);

if (assets.js) {
const setNonce = nonce && `.setAttribute("nonce", ${JSON.stringify(nonce)})`;
Expand Down Expand Up @@ -257,7 +257,7 @@ function renderAssets() {
this.end = this.___end;

if (assets) {
this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);
__webpack_require__.p && this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);

if (assets.js) {
const setNonce = nonce && `.setAttribute("nonce", ${JSON.stringify(nonce)})`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ __webpack_require__(/*! ./components/nested/index.marko?dependencies */ "./src/_
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/with-class-component-plugin-dynamic-bundle/test.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ __webpack_require__(/*! ./components/nested/index.marko?dependencies */ "./src/_
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/with-class-component-plugin-dynamic-bundle/test.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ __webpack_require__(/*! ./components/nested/index.marko?dependencies */ "./src/_
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/with-class-component-plugin-dynamic-bundle/test.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function renderAssets() {
this.end = this.___end;

if (assets) {
this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);
__webpack_require__.p && this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);

if (assets.js) {
const setNonce = nonce && `.setAttribute("nonce", ${JSON.stringify(nonce)})`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ __webpack_require__(/*! ./components/nested/index.marko?dependencies */ "./src/_
/***/ (function(module, exports, __webpack_require__) {


if (window.$mwp) {
__webpack_require__.p = $mwp;
}

if (window.$mwp) __webpack_require__.p = $mwp;
__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/with-class-component-plugin/test.marko?dependencies");
window.$initComponents && $initComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function renderAssets() {
this.end = this.___end;

if (assets) {
this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);
__webpack_require__.p && this.script(`$mwp=${JSON.stringify(__webpack_require__.p)}`);

if (assets.js) {
const setNonce = nonce && `.setAttribute("nonce", ${JSON.stringify(nonce)})`;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/******/ ({

/***/ "./src/__tests__/fixtures/with-public-path/test.marko?dependencies":
/*!*************************************************************************!*\
!*** ./src/__tests__/fixtures/with-public-path/test.marko?dependencies ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {



/***/ }),

/***/ "./src/__tests__/fixtures/with-public-path/test.marko?hydrate":
/*!********************************************************************!*\
!*** ./src/__tests__/fixtures/with-public-path/test.marko?hydrate ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {



__webpack_require__(/*! ./test.marko?dependencies */ "./src/__tests__/fixtures/with-public-path/test.marko?dependencies");
window.$initComponents && $initComponents();



/***/ })

/******/ });
Loading

0 comments on commit 6d117c9

Please sign in to comment.