Giter Club home page Giter Club logo

Comments (6)

shff avatar shff commented on June 8, 2024 1

Hey guys!

Sorry I took that long to reply.

@danielo515 I believe that something along those lines will work. I'll work on it!

from parcel-plugin-inliner.

shff avatar shff commented on June 8, 2024 1

Update: I'm using --public-url to publish to GH pages, so it can't be . as desired by this plugin.

Unfortunately the usage of --public-url is necessary, due to limitations in the dependencies I'm using. Using an absolute path throws the PostHTML plugin off.

Perhaps you could try running Parcel using --public-url . and then moving the files to the desired location?

from parcel-plugin-inliner.

danielo515 avatar danielo515 commented on June 8, 2024

I have exactly the same problem

from parcel-plugin-inliner.

danielo515 avatar danielo515 commented on June 8, 2024

I think the problem is related to this line:

process.env.NODE_ENV !== "production"

So it only unlined resources in production.
It will be nice if it can check another additional env variable so you don't need to set env to production while developing.

Something like

process.env.NODE_ENV !== "production" || process.env.INLINE !== "yes"

from parcel-plugin-inliner.

shff avatar shff commented on June 8, 2024

Hello, sorry for the delay... I just added the INLINE_ASSETS option to force asset inlining and published that to NPM in the 1.0.2 version.

You can pass any value to that variable. E.g.:

# Will inline
INLINE_ASSETS=true NODE_ENV=development yarn build

# Won't inline
NODE_ENV=development yarn build

Hope that's what you guys need!

(Feel free to reopen if you have suggestions)

from parcel-plugin-inliner.

swashcap avatar swashcap commented on June 8, 2024

Still seeing this behavior, even with INLINE_ASSETS=true. 😕

Update: I'm using --public-url to publish to GH pages, so it can't be . as desired by this plugin.

from parcel-plugin-inliner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.