Skip to content

Latest commit

 

History

History
 
 

plugin-define

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

wepy define plugin

Install

npm install @wepy/plugin-define --save-dev

Configration

wepy.config.js

const DefinePlugin = require('@wepy/plugin-define');

module.exports = {
  plugins: [
    DefinePlugin({
      BASE_URL: JSON.stringify('http://foobar.com'),
      'process.env.NODE_ENV': 'development',
      'typeof window': JSON.stringify('undefined'),
      DEV: true
    })
  ]
};

Reference

webpack.DefinePlugin