Gcaufy 29e16edf9f test(plugin-define): fix timeout time | 4 years ago | |
---|---|---|
.. | ||
test | 29e16edf9f test(plugin-define): fix timeout time | 4 years ago |
.npmignore | f94e20b73d feat(plugin-define): added plugin-define | 5 years ago |
CHANGELOG.md | d995f52a61 chore(release): publish v2.1.0 | 4 years ago |
README.md | 428303a1fd add English and Chinese translation | 4 years ago |
README_EN.md | 428303a1fd add English and Chinese translation | 4 years ago |
index.js | 02aa812725 style: eslint auto fix | 5 years ago |
package.json | d995f52a61 chore(release): publish v2.1.0 | 4 years ago |
English | 简体中文
npm install @wepy/plugin-define --save-dev
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
})
]
};