Comments (6)
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.
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.
I have exactly the same problem
from parcel-plugin-inliner.
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.
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.
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)
- Unable to configure the posthtml-inline-assets module HOT 4
- changes to assets during `parcel watch` don't propagate to inlined copies HOT 2
- Not compatible with parcel-plugin-ogimage HOT 4
- Failure to escape '</script' in inlined code HOT 1
- Example links in README are broken. HOT 3
- how can it only inline in production mode, disable inline in development mode HOT 1
- FYI
- Comments are removed, overriding .terserrc file HOT 1
- what about favicon.ico? HOT 1
- How to use with scss? HOT 1
- Does this plugin support parcel version >= 2.0.0-beta.1? HOT 4
- Last two version are not published to NPM repo HOT 2
- Does not work on Windows HOT 1
- Inline asserts in generated html files. HOT 1
- Allow to conditionally inline ressources HOT 2
- Unable to resolve local CSS files HOT 2
- Cannot read property 'type' of null HOT 5
- Only inline certain types of resources HOT 1
- Working with SVG HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parcel-plugin-inliner.