Closed jessehattabaugh closed 5 years ago
I tried uncommenting the line above, and commenting out the line with the error and it works fine now.
Which version of parcel are you using?
Parcel 1.9.7 Node 10.9.0
The only message I get with the included example and Parcel 1.9.7 is: asset.package
is deprecated. Please use await asset.getPackage()
instead.`.
I don't get that message
On Wed, Sep 5, 2018 at 11:54 PM Niklas Mischkulnig notifications@github.com wrote:
The only message I get with the included example and Parcel 1.9.7 is: asset.package is deprecated. Please use await asset.getPackage() instead.`.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mischnic/parcel-plugin-sw-cache/issues/12#issuecomment-418985280, or mute the thread https://github.com/notifications/unsubscribe-auth/AABGR-mGV5_WOXXH-ZYB6-XP3_rSgXQIks5uYMaIgaJpZM4WbtXI .
Any idea when you'll have time to fix this?
Any idea when you'll have time to fix this?
I can't reproduce it (yet). Which version of parcel-plugin-sw-cache
do you have installed? (Latest is v0.2.5).
Could you please insert this: console.log(bundle.entryAsset);
before the line where the error happens and post the output?
Do you get this error with the included example? (Clone parcel-plugin-sw-cache, run npm i
or yarn
inside the example folder and run the start
or build
script.
I am using "parcel-plugin-sw-cache": "^0.2.5".
console.log(bundle.entryAsset); outputs null
console.dir(bundle); outputs this;
Bundle {
type: undefined,
name: undefined,
parentBundle: undefined,
entryAsset: null,
assets: Set {},
childBundles:
Set {
Bundle {
type: 'html',
name:
'C:\\Users\\Jesse Hattabaugh\\jessehattabaugh-com\\dist\\index.html',
parentBundle: [Circular],
entryAsset: [HTMLAsset],
assets: [Set],
childBundles: [Set],
siblingBundles: Set {},
siblingBundlesMap: Map {},
offsets: Map {},
totalSize: 7858,
bundleTime: 1784,
isolated: undefined },
Bundle {
type: 'html',
name:
'C:\\Users\\Jesse Hattabaugh\\jessehattabaugh-com\\dist\\share.html',
parentBundle: [Circular],
entryAsset: [HTMLAsset],
assets: [Set],
childBundles: Set {},
siblingBundles: Set {},
siblingBundlesMap: Map {},
offsets: Map {},
totalSize: 2499,
bundleTime: 1821,
isolated: undefined } },
siblingBundles: Set {},
siblingBundlesMap: Map {},
offsets: Map {},
totalSize: 0,
bundleTime: 0,
isolated: undefined }
When I run example
I get the error that you mentioned: Parcel 1.9.7 is: asset.package is deprecated. Please use await asset.getPackage() instead.
I notice that the example is using "parcel-bundler": "^1.9.0", "parcel-plugin-sw-cache": "^0.2.0"
I get your error now as well, it's because you have multiple entry points (e.g. parcel src/index.html src/page.html
).
Yes, my build command is parcel build src/*.html
and there are two .html files in /src
. Is that not supported by this plugin?
Is that not supported by this plugin?
Please test with version 0.2.6.
Woo hoo! Working fine! Much appreciated!
I get an error when I bundle:
coming from this line
I tried adding the
cache
property to my package.json. but it didn't help.I'm on Windows 10, the error occurs in PowerShell and WSL Ubuntu Bash