Comments (14)
NIce! Yea, this seems like a more complex integration since it needs to understand your file tree (most of our builds right now are single-file input->output). But, would love to use this as framework for supporting a more complex plugin like this.
i'm fully focused on getting v2.0.0 released this week, so no rush on my end. I'll ping this thread next week tho, happy to help where I can.
from create-snowpack-app.
Happy to kick this off:
- how does Routify work?
- Does it read your file system as a part of some build/bundle step?
- However it detects your file system roots, how can we recreate that as a build script plugin?
I'm happy to answer that last question if someone can shed some light on how Routify works.
from create-snowpack-app.
cross posted the issue on Routify too roxiness/routify#176
from create-snowpack-app.
@FredKSchott <-> @jakobrosenberg
roxiness/routify#176 (comment)
from create-snowpack-app.
Hi @FredKSchott
Routify itself is very simple from a build perspective. It scans your pages folder and outputs a routes.js with all your route information. I haven't had time to try Snowpack yet, but it's at the top of my list. As such this conversation might be more productive after I've had time to try it out - unless someone else is willing to try porting the current starter template and sharing the experience.
from create-snowpack-app.
Closing since I haven't seen any activity (and I'm on a clean-out-the-issues kick) but happy to reopen if this is something anyone is still interested in pursuing
from create-snowpack-app.
I'm trying out Snowpack for our upcoming framework, Roxi. Very excited! Is it possible to run Snowpack programmatically?
I have found references to import { install } from 'snowpack'
, but I haven't found any usage examples and the install
variable seems undefined.
from create-snowpack-app.
Currently handling it like this:
process.argv.push('--config', '_roxi/snowpack.config.js')
require('snowpack/dist-node/index.bin')
@FredKSchott is it possible to import absolute paths with Snowpack?
from create-snowpack-app.
It's on our roadmap, would love some help if you're interested in contributing!
re: importing absolute paths, I don't think that's supported in your application code. The closest thing we have is https://www.snowpack.dev/#project-relative-imports
from create-snowpack-app.
@FredKSchott I would love to contribute. Maybe when I get a little more familiar with Snowpack.
I tried mapping the absolute paths to relative paths, but had no luck using mount
. Then I tried transforming absolute paths to relative paths imports using script
, but scripts don't seem to support inline code. Lastly I tried a quick inline plugin
, but learned that plugins have to be strings.
A) Is it possible to transform files directly in snowpack.config.js
?
B) Is it possible to alias a mount? Roxi has a roxi
package and Roxi projects have a roxi
folder in the root containing configs and generated runtime code. Optimally I would be able to alias the local roxi
folder as runtime
or similar.
from create-snowpack-app.
@jakobrosenberg you should be able to this:
"scripts": {
// Example 1: mount "./roxy" folder to "/roxy/*" URLs
"mount:roxi": "mount roxi"
// Example 2: mount "./roxy" folder to "/runtime/*" URLs
"mount:roxi": "mount roxi --to /runtime"
}
from create-snowpack-app.
Right now we don't support objects/functions in your "plugins" array, but we do support relative paths to import a plugin:
"plugins": ["./my-custom-plugin.js"]
from create-snowpack-app.
@FredKSchott sorry, I just realized I could have explained B better. If I have both a roxi folder and a roxi package and I mount roxi
to runtime
, the roxi package is no longer available.
At the moment I'm handling it by prefixing the roxi folder as _roxi
.
from create-snowpack-app.
Ah, gotcha. Yup, that's a limitation of the current system. We should detect this and warn you ahead of time, on startup
from create-snowpack-app.
Related Issues (20)
- Babel Plugin import not working with snowpack HOT 1
- [webpack] Support non-SPA use-case HOT 1
- [plugin-webpack] Not compatible with [app-template-vue] HOT 1
- [plugin-webpack] Production builds: No bundle splitting based on `import(...)` directives HOT 9
- [plugin-svelte] Can not find App.css.js HOT 3
- Provide a blank template for Typescript HOT 4
- Feature request: Add pnpm as install option HOT 5
- Building is broken for Svelte HOT 5
- Add support for creating .gitignore from template HOT 5
- Can we have cli wizard prompts? HOT 6
- @snowpack/app-template-blank-typescript does not exist on NPM HOT 5
- onboard validations to ensure that the respective package manager is installed HOT 4
- plugin-dotenv doesn't work HOT 2
- [plugin-webpack] granular chunking for multi-page apps?
- [@snowpack/app-template-11ty] - HMR issue eleventy templates HOT 1
- Migrating Reactboilerplate app into CSA failing HOT 2
- [@snowpack/plugin-webpack] Use public path instead of baseUrl HOT 1
- [pnpm] missing dependencies in app-template-react-typescript (--use-pnpm) HOT 2
- svelte-typescript-template HOT 1
- Vue cannot use PostCSS in style tag. HOT 1
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 create-snowpack-app.