Skip to content

jimmyn/hexo-renderer-webpack-2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexo-renderer-webpack-2-advanced

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-advanced

Options

Add webpack.config.js to the project root

module.exports = {
  entry: [
    'themes/default/source/js/index.js',
    'themes/default/source/js/page.js',
  ],
  module: {
    loaders: [{
      test: /\.js/,
      loader: 'babel-loader',
      exclude: /node_modules/,
      query: {
        presets: [
          ['es2015', {
            modules: false,
            loose: true
          }]
        ]
      }
    }]
  }
};

or specify the file path in config

webpack_config: 'themes/my-theme/webpack.config.js'

Only files added to entry will be transpiled with the webpack

Links

About

A Hexo renderer for Webpack(v2).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%