1.0.0-5 • Published 6 years ago

ok-config v1.0.0-5

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

ok-config

Installable webpack config for React and MDX with smart defaults

npm i -D ok-config

Install webpack dependencies if needed:

npm i -D webpack webpack-serve

In your own webpack config, extend the base ok-config.

// webpack.config.js
module.exports = {
  mode: 'development',
  extends: 'ok-config'
}

Create an entry at src/index.js

import React from 'react'
import { render } from 'react-dom'

const App = props =>
  <h1>Hello</h1>

render(<App />, root)

Add a run script to your package.json

"scripts": {
  "start": "webpack-serve"
}

And start the dev server:

npm start

Features

  • Default babel-loader config with the following:
    • preset-env
    • preset-stage-0
    • preset-react
    • plugin-macros
  • MDX loader with the following plugins:
    • remark-images
    • remark-emoji
    • remark-slug
    • remark-autolink-headings
  • ProgressBarPlugin