Skip to content

A weex target for webpack which make lazyload possible in weex

Notifications You must be signed in to change notification settings

iquejay/webpack-weex-target

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-weex-target

A weex target for webpack which make lazyload possible in weex

中文说明

default for Webpack 4.x

Version for webpack3.x please use webpack-weex-target@1.x

Installing

npm install --save-dev webpack-weex-target

Note

if you use webpack-weex-target, webpack default target will not be 'web', therefor the aliasFields will be '[]'. This may have an influence on packget dependencies, for example, axios may think runing in node env. then you can add the config below to resolve this problem.

// webpack.config.js
{
  // ...
  resolve: {
    aliasFields: ['browser'],
    // ...
  }
}

Example

const WeexTemplateTarget = require('webpack-weex-target')

const weexConfig = {
  target: WeexTemplateTarget,
  // ...
  resolve: {
    aliasFields: ['browser']
  }
  // ...
};

module.exports = weexConfig

So, make youself!

About

A weex target for webpack which make lazyload possible in weex

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published