webpack-preset-unity
v2.2.0
Published
Default presets of webpack configs used by Unity
Downloads
38
Readme
webpack-preset-unity
webpack preset.
Usage
Install:
npm install --save-dev webpack-preset-unity
Configure
Require webpack-preset-unity
from your own webpack.config.js
. If you want, you can override all of the config fields.
The module returns a factory function that creates common config for webpack.
Because your project can be built in unexpected environment you shoud know CWD
– current working directory.
It can be passed to the factory by argument like in example.
By default, CWD
will be path.join(require.resolve('.'), '../../..')
– 3 levels up from the webpack-preset-unity's main file.
const config = require('webpack-preset-unity')(__dirname);
config.module.noParse = /node_modules\/localforage\/dist\/localforage.js/;
module.exports = config;