-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set a directory as entry point #1239
Comments
Can't you just run |
Thanks @dobesv I never knew I could do that 😱 Observations using
I did get away with |
The translation from json to js is normal, it's so you can import json from
js.
…On Sat, May 19, 2018, 4:31 AM Rohith Reddy Kumbharkar < ***@***.***> wrote:
Closed #1239 <#1239>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1239 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUAmY6vUgZ-4bgpaa5vyRsOLsKMss_yks5t0AKAgaJpZM4ThE5D>
.
|
I also have this demand. I want to compile all the files in a directory, the directory structure is similar to the following
This is an http application that decides which api to load based on a request parameter. index.ts is like import Koa from 'koa';
const app = new Koa();
app.use(async ctx => {
const func = require('./api/' + ctx.request.query.funcName);
ctx.body = func();
});
app.listen(3000); Now I can use |
🙋 feature request
🤔 Expected Behavior
Being able to provide a directory as an entry point. Parcel can then process all files in that directory & spit them out to dist folder
😯 Current Behavior
Parcel requires a file as an entry point which helps in computing & processing the dependencies
💁 Possible Solution
#189 might help in providing a possible solution. I guess even the dependency computation can be skipped as all files in the directory can be processed as one-to-one
Although, I'm not sure about a situation where few files in the directory need to be bundled together as a single file post processing
🔦 Context
In a simple setup like this, where src directory is the entry point for parcel it should be able to produce the files in dist directory
Although the sample directory structure resembles a web extension (#1039), it might not always be the case & being able to point to a directory handles a lot of use-cases
The text was updated successfully, but these errors were encountered: