-
Notifications
You must be signed in to change notification settings - Fork 10.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
Require a whitelist for "page" file types #208
Closed
KyleAMathews opened this issue
Mar 23, 2016
· 2 comments
· Fixed by #357 · May be fixed by tejzpr/gatsby#63
Closed
Require a whitelist for "page" file types #208
KyleAMathews opened this issue
Mar 23, 2016
· 2 comments
· Fixed by #357 · May be fixed by tejzpr/gatsby#63
Comments
Right now if you add a file type to your pages directory which doesn't have a webpack loader, Gatsby will throw an error. Instead users should whitelist which file types are "pages" and everything else should be treated as an "asset" which is just copied over to public on build. |
+1 |
Closed
KyleAMathews
added a commit
that referenced
this issue
Mar 26, 2016
app.js had three weirdly merged features. 1. It held the require.context magic function stuff from Webpack to autoload page modules from the `pages` directory. 2. You could export a function to programatically rewrite paths. 3. You could export a function which would get run on every route change (useful for things like tracking path changes in Google Analytics). This PR moves the require.context to a an auto-written file. This sets the stage for #208. To rewrite paths, now export the same function from gatsby.config.js. And for `onRouteChange`, export this from `gatsby-client-utils.js` which is for client-only user functions used by Gatsby core.
KyleAMathews
added a commit
that referenced
this issue
Mar 26, 2016
app.js had three weirdly merged features. 1. It held the require.context magic function stuff from Webpack to autoload page modules from the `pages` directory. 2. You could export a function to programatically rewrite paths. 3. You could export a function which would get run on every route change (useful for things like tracking path changes in Google Analytics). This PR moves the require.context to a an auto-written file. This sets the stage for #208. To rewrite paths, now export the same function from gatsby.config.js. And for `onRouteChange`, export this from `gatsby-client-utils.js` which is for client-only user functions used by Gatsby core.
This was referenced Apr 27, 2016
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends on #17
The text was updated successfully, but these errors were encountered: