-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Babel configuration #29
Milestone
Comments
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
- @babel/plugin-proposal-class-properties (1) - @babel/plugin-proposal-export-default-from (2) - @babel/plugin-proposal-nullish-coalescing-operator (3) - @babel/plugin-proposal-optional-chaining (4) - babel-plugin-transform-react-remove-prop-types (5) References: (1) https://www.npmjs.com/package/@babel/plugin-proposal-class-properties (2) https://www.npmjs.com/package/@babel/plugin-proposal-export-default-from (3) https://www.npmjs.com/package/@babel/plugin-proposal-nullish-coalescing-operator (4) https://www.npmjs.com/package/@babel/plugin-proposal-optional-chaining (5) https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types GH-29
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
Configured the installed Babel proposal plugins through Gatsby's Node API (1) using the provided `setBabelPlugin` action (2). References: (1) https://www.gatsbyjs.org/docs/node-apis (2) https://www.gatsbyjs.org/docs/actions GH-29
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
Configured the `babel-plugin-transform-react-remove-prop-types` Babel plugin (1) to remove all React `propTypes` when building a bundle in production mode. It is implemented through Gatsby's Node API (1) using the provided `setBabelOptions` action (3). References: (1) https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types (2) https://www.gatsbyjs.org/docs/node-apis (3) https://www.gatsbyjs.org/docs/actions GH-29
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
- @babel/plugin-proposal-class-properties (1) - @babel/plugin-proposal-export-default-from (2) - @babel/plugin-proposal-nullish-coalescing-operator (3) - @babel/plugin-proposal-optional-chaining (4) - babel-plugin-transform-react-remove-prop-types (5) References: (1) https://www.npmjs.com/package/@babel/plugin-proposal-class-properties (2) https://www.npmjs.com/package/@babel/plugin-proposal-export-default-from (3) https://www.npmjs.com/package/@babel/plugin-proposal-nullish-coalescing-operator (4) https://www.npmjs.com/package/@babel/plugin-proposal-optional-chaining (5) https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types GH-29
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
Configured the installed Babel proposal plugins through Gatsby's Node API (1) using the provided `setBabelPlugin` action (2). References: (1) https://www.gatsbyjs.org/docs/node-apis (2) https://www.gatsbyjs.org/docs/actions GH-29
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
Configured the `babel-plugin-transform-react-remove-prop-types` Babel plugin (1) to remove all React `propTypes` when building a bundle in production mode. It is implemented through Gatsby's Node API (1) using the provided `setBabelOptions` action (3). References: (1) https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types (2) https://www.gatsbyjs.org/docs/node-apis (3) https://www.gatsbyjs.org/docs/actions GH-29
Merged
arcticicestudio
added a commit
that referenced
this issue
Nov 19, 2018
…guration Babel configuration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gatsby comes with an already optimized Babel configuration to create SSR “static” websites and apps, but there are also use cases that require to modify and extend this configuration to e.g. add a new Babel plugin for the latest syntax feature/proposal support.
Of course Gatsby provides a way through the Node API by implementing the
onCreateBabelConfig
function.Nord Docs will make use of the following proposals and plugins:
@babel/plugin-proposal-class-properties
(NOTE: This plugin will be configured with the enabledloose
option!)@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-nullish-coalescing-operator
(NOTE: This plugin will be configured with the disabledloose
option!)@babel/plugin-proposal-optional-chaining
(NOTE: This plugin will be configured with the disabledloose
option!)propTypes
from production builds. NOTE: This plugin will only be used inproduction
mode with enabledremoveImport
option and will ignore thenode_modules
folder through theignoreFilenames
option!The plugins and Babel options will be implemented using Gatsby's provided actions
setBabelPlugin
andsetBabelOptions
.Tasks
setBabelPlugin
API function.babel-plugin-transform-react-remove-prop-types
for production build via thesetBabelOptions
API function.The text was updated successfully, but these errors were encountered: