hexo-renderer-webpack-2
Webpack v2 renderer plugin for Hexo
Last updated 4 years ago by haydnhkim .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hexo-renderer-webpack-2 
SYNC missed versions from official npm registry.

hexo-renderer-webpack-2

Add Hexo support for Webpack(v2).

Fork from the original hexo-renderer-webpack repository: https://github.com/briangonzalez/hexo-renderer-webpack

Install

$ npm install --save hexo-renderer-webpack-2

Options

You can configure this plugin in _config.yml or your theme's _config.yml.

If you want to use some presets, you will need to install and set presets value.

$ npm install --save-dev babel-core babel-loader babel-preset-es2015 babel-preset-react babel-preset-stage-0
webpack:
  entry: "source/scripts/faq.js"
  module:
    loaders:
      -
        test: !!js/regexp /\.json$/
        loader: "json-loader"
      -
        test: !!js/regexp /\.(png|jpg|jpeg|gif|svg|woff|woff2)(\?.*)?$/
        loader: "file-loader"
      -
        test: !!js/regexp /\.js$/
        exclude: !!js/regexp /node_modules/
        loader: "babel"
        query:
          presets:
            - "es2015"
            - "stage-0"
            - "react"

or

webpack:
  entry:
    - 'themes/my-theme/source/js/app.js'
    - 'themes/my-theme/source/js/lib.js'

Development Mode

This project uses NODE_ENV variable for sourcemap.

set package.json

{
    "name": "hexo-renderer-webpack-2",
    ...
    scripts: {
        "dev": "NODE_ENV=development hexo server"
    }
}

run

$ npm run dev

Known Issues

  • This project is not fully support webpack. You can't set node modules in entry.
  • break complie when js has HTML tags.

Links

Current Tags

  • 0.5.0                                ...           latest (4 years ago)

1 Versions

  • 0.5.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |