Comments (4)
It's not quite as easy as that, but we could add a buildProduction
switch that did buildDevelopment
's flattening of the JavaScript includes before proceeding. I don't understand see how the use case you're describing could work, though.
JavaScriptOneInclude
and JavaScriptCommonJsRequire
won't work if your development version hasn't been through something like buildDevelopment
. (Of course, require.js will work fine).
Also, the i18n features rely on the 'bootstrapper' script in development, so you'll need buildDevelopment
eventually.
from assetgraph-builder.
I'm just trying to sell buildProduction
to users as an easy way to get started. If it then behaves as they wouldn't expect it's not an easy sell :)
I thought that the only reason why INCLUDE
wouldn't be populated in buildDevelopment
is that it is specificly filtered out in https://github.com/One-com/assetgraph-builder/blob/master/bin/buildProduction#L165
If JavaScriptInclude
was populated, wouldn't buildProduction
be able to correctly bundle relations? I am thinking that even if you did a previous buildDevelopment
and ran buildProduction
on that output, https://github.com/One-com/assetgraph-builder/blob/master/bin/buildProduction#L186 would take care out the double reference and still be able to put the INCLUDE
d assets in the right order.
I am here assuming non-usage of the i18n features which i am totally on board with not working in a dev environment without a dev build.
from assetgraph-builder.
Ah, I thought you were talking about one of your own use cases.
If JavaScriptInclude was populated, wouldn't buildProduction be able to correctly bundle relations? I am thinking that even if you did a previous buildDevelopment and ran buildProductionon that output
Well, in theory, yes, but I'm still not a fan, because I fail to see the use case for INCLUDE
without buildDevelopment
. Your project wouldn't work before it had been run through buildProduction
, which would be a terrible workflow. And I really hope we're not trying to sell INCLUDE
to new users?
https://github.com/One-com/assetgraph-builder/blob/master/bin/buildProduction#L186 would take care out the double reference and still be able to put the
INCLUDE
d assets in the right order.
No, mergeIdenticalAssets
just makes sure that assets with the same MD5 become the same node in the graph, which they would already be because the INCLUDE
and the <script src="...">
would be pointing at the same url. We would need additional transforms to weed out the duplicate <script src="...">
that would be introduced.
All in all I'm not convinced this is worth the extra complexity.
from assetgraph-builder.
I agree that we shouldn't try to market INCLUDE.
I think I might actually have confused myself with this issue. I'll close it and reopen if I remember what my original point was :D
from assetgraph-builder.
Related Issues (20)
- Dedupe source maps HOT 1
- RSS feed link gets updated wrong
- When browsers list is not configured, look for it in package.json HOT 2
- Support .browserslistrc and browserslist key in package.json HOT 5
- Is it possible to wrap the built JS in a function to not expose define() ? HOT 4
- Throws when encountering Html Svg island with inline style HOT 1
- Generates invalid syntax from ES6 code HOT 4
- `node-zopfli` package seems no longer maintained HOT 5
- Ruby Sass is deprecated HOT 2
- Add `--preflight-check` cmdline option HOT 7
- `npm audit` complaints HOT 6
- Breaks await expression HOT 4
- Breaks relative ES6 module paths HOT 4
- ⚠ WARN: Cannot read property 'length' of null HOT 2
- [Q] CHANGELOG? HOT 4
- make assetgraph to not process svg HOT 2
- Translation not working HOT 1
- How to customize? HOT 3
- a vulnerability CVE-2020-7598 is introduced in assetgraph-builder
- Svgo is not a constructor HOT 4
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 assetgraph-builder.