Skip to content
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

Webpack configuration #31

Closed
4 tasks done
arcticicestudio opened this issue Nov 19, 2018 · 0 comments
Closed
4 tasks done

Webpack configuration #31

arcticicestudio opened this issue Nov 19, 2018 · 0 comments

Comments

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Nov 19, 2018

Related epics: #25

This story is almost the same like the modified Babel configuration implemented in #29, but for the Webpack configuration instead. It will be used to

Gatsby also supports this by providing the onCreateWebpackConfig function through the Node API.

Tasks

  • Install required Webpack plugin packages:
  • Configure resolve aliases for
    • src/assets
    • src/atoms
    • src/config
    • src/containers
    • src/data
    • src/layouts
    • src/molecules
    • src/organisms
    • src/pages
    • src/stores
    • src/styles
    • src/templates
    • src/utils
  • Configure git-revision-webpack-plugin to provide the version, commit hash and branch as environment variables through through the webpack.DefinePlugin.
  • Configure webpack-bundle-analyzer to generate a "static" report with a JSON stats file stored in a newly created build directory within the project root.
@arcticicestudio arcticicestudio added this to the 0.1.0 milestone Nov 19, 2018
@arcticicestudio arcticicestudio self-assigned this Nov 19, 2018
arcticicestudio added a commit that referenced this issue Nov 19, 2018
Installed the first Webpack (1) plugins:

- "webpack-bundle-analyzer" (2) - Visualizes the size of Webpack output
  files with an interactive zoomable treemap.
- "git-revision-webpack-plugin" - Generates VERSION and COMMITHASH files
  during build based on a local Git repository.

References:
  (1) https://webpack.js.org
  (2) https://www.npmjs.com/package/git-revision-webpack-plugin
  (3) https://www.npmjs.com/package/webpack-bundle-analyzer

GH-31
arcticicestudio added a commit that referenced this issue Nov 19, 2018
Configured  the `webpack-bundle-analyzer` (1) plugin to generate a
"static" report with a JSON stats file stored in a newly created build
directory within the project root.

References:
  (1) https://github.com/webpack-contrib/webpack-bundle-analyzer

GH-31
arcticicestudio added a commit that referenced this issue Nov 19, 2018
Configured `git-revision-webpack-plugin` (1) to provide the version,
commit hash and branch as environment variables through through the
`webpack.DefinePlugin` (2).
The data is exposed through the following environment variables:

- `NORD_DOCS_GIT_VERSION`
- `NORD_DOCS_GIT_COMMITHASH`
- `NORD_DOCS_GIT_BRANCH`

References:
  (1) https://github.com/pirelenito/git-revision-webpack-plugin
  (2) https://webpack.js.org/plugins/define-plugin

GH-31
arcticicestudio added a commit that referenced this issue Nov 19, 2018
@arcticicestudio arcticicestudio removed their assignment Nov 19, 2018
@arcticicestudio arcticicestudio mentioned this issue Nov 23, 2018
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant