Closed cowwoc closed 9 years ago
When I run parcelify target\classes\..\factor-bundle\com\company\frontend\page\Index.js -j bundle.js -c bundle.css I get fully-populated bundle.js and bundle.css files.
parcelify target\classes\..\factor-bundle\com\company\frontend\page\Index.js -j bundle.js -c bundle.css
bundle.js
bundle.css
When I attempt to do the same thing using the API:
parcelify("target/classes/../factor-bundle/com/company/frontend/page/Index.js", { bundles: { script: "bundle.js", style: "bundle.css" } });
I get an identical CSS file, but the JS file only contains this skeleton:
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ },{}]},{},[1])
i've studied cmd.js upwards and downwards but I can't figure out how the two code snippets differ. If I set verbose: true I get the following output:
cmd.js
verbose: true
verb style asset registered "target\sass-temp\com\company\frontend\page\Authentications.css" verb style asset registered "target\sass-temp\com\company\frontend\page\Cards.css" verb style asset registered "target\sass-temp\com\company\frontend\page\Index.css" verb style asset registered "target\sass-temp\com\company\frontend\page\Properties.css" verb style asset registered "target\sass-temp\com\company\frontend\page\Users.css" verb style asset registered "target\sass-temp\com\company\frontend\page\util\ResourceTable.css" verb Created new package C:\Users\Gili\Documents\company\frontend with id 65b6346f1d65eec8b01d374ab3dc4269487dbf0e
Can you think of anything I could be doing wrong which results in this incorrect JS output?
No ideas come to mind. Were you able to figure this out? Can you provide a mini project so that we can reproduce?
I ended up giving up and moving to Webpack. Thanks anyway...
When I run
parcelify target\classes\..\factor-bundle\com\company\frontend\page\Index.js -j bundle.js -c bundle.css
I get fully-populatedbundle.js
andbundle.css
files.When I attempt to do the same thing using the API:
I get an identical CSS file, but the JS file only contains this skeleton:
i've studied
cmd.js
upwards and downwards but I can't figure out how the two code snippets differ. If I setverbose: true
I get the following output:Can you think of anything I could be doing wrong which results in this incorrect JS output?