parcel

Passing Parcelable object which has a member variable which is Not parcelable(a class that belongs to third party library)

好久不见. 提交于 2021-02-11 14:13:51
问题 I'm trying to send a class's object(let's say Class X's object) as part of class that implements Parcelable. The problem that I am facing here is, Class X is a part of some library and I can not edit it to implement Parcelable or serializable. I've checked that Class X does not implement Parcelable or serializable and we can not change as well. Can you guys please help me here? MainActivity: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle

Uncaught ReferenceError: jQuery is not defined VueJS Parcel

偶尔善良 提交于 2021-01-28 08:32:22
问题 I have this: import jQuery from 'jquery' import HSCore from './components/assets/js/hs.core.js' Yet I still get this: Uncaught ReferenceError: jQuery is not defined at Object.parcelRequire.client/components/assets/js/hs.core.js (hs.core.js:177) Why 😑 import jQuery from 'jquery' does actually import jQuery (via console.log(jQuery) ), but my other JS file is having problems accessing it(?). This is in a Vue file using Parcel loader. hs.core.js file: (function ($) { ... })(jQuery); //<-- line

How to load font from @font-face with Parcel?

妖精的绣舞 提交于 2021-01-27 12:20:51
问题 I'm using Parcel for bundling and I want to include custom font to my project In my SCSS @font-face { font-family: "Storytella"; src: url("./fonts/Storytella.otf") format("otf"); } Then I'm using it somewhere like this font-family: 'Storytella', serif; package.json { "name": "pr", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "normalize.css": "^8.0.1", "parcel-bundler": "^1.12.3" }, "devDependencies": { "node-sass": "^4.12.0", "parcel-plugin-static-files-copy":

Parcel - Babel - Vue - Error: Cannot find module `…/…/img.svg`

自古美人都是妖i 提交于 2020-12-13 03:41:07
问题 Im a bit in the dark therefore reaching out as I couldnt find a solution or answer. Im using parcel with Vue and trying to import a static image as ../img/logo.svg . This used to work before until I introduced Babel to the mix. Now I get Error: Cannot find module 'img/logo.svg' during runtime. It is weird because in the dist folder I see a logo.svg with a hash. Is it a babel or parcel issue? do I need some extra plugin? or something Im missing?. Im basically using babel out the box. I just

Parcel - Babel - Vue - Error: Cannot find module `…/…/img.svg`

回眸只為那壹抹淺笑 提交于 2020-12-13 03:35:59
问题 Im a bit in the dark therefore reaching out as I couldnt find a solution or answer. Im using parcel with Vue and trying to import a static image as ../img/logo.svg . This used to work before until I introduced Babel to the mix. Now I get Error: Cannot find module 'img/logo.svg' during runtime. It is weird because in the dist folder I see a logo.svg with a hash. Is it a babel or parcel issue? do I need some extra plugin? or something Im missing?. Im basically using babel out the box. I just

JavaScript function won't trigger when called in HTML file during Parcel build

有些话、适合烂在心里 提交于 2020-08-23 04:05:10
问题 I have a basic HTML form page that is linked to a JavaScript file. Both files exist in a Node project and I am using Parcel as a bundler (because I eventually want to convert this to TypeScript). When I run the html file in the browser, the JavaScript function will trigger, but when I run the Parcel build, the index.html will compile, but the JavaScript function won't trigger. It recognizes the js file because I can call dom queries outside the function. When I check in the console I get the

JavaScript function won't trigger when called in HTML file during Parcel build

南笙酒味 提交于 2020-08-23 04:04:40
问题 I have a basic HTML form page that is linked to a JavaScript file. Both files exist in a Node project and I am using Parcel as a bundler (because I eventually want to convert this to TypeScript). When I run the html file in the browser, the JavaScript function will trigger, but when I run the Parcel build, the index.html will compile, but the JavaScript function won't trigger. It recognizes the js file because I can call dom queries outside the function. When I check in the console I get the