ok-config

1.0.0-5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i ok-config

Weekly Downloads

0

Version

1.0.0-5

License

MIT

Unpacked Size

4.43 kB

Total Files

4

Last publish

Collaborators

  • jxnblk