mirror of https://github.com/embarklabs/embark.git
rev comments
This commit is contained in:
parent
65d2153638
commit
6149921562
|
@ -1,22 +1,14 @@
|
|||
/* global module process require */
|
||||
|
||||
// NOTE: some packages, plugins, and presets referenced/required in this webpack
|
||||
// some packages, plugins, and presets referenced/required in this webpack
|
||||
// config are deps of embark and will be transitive dapp deps unless specified
|
||||
// in the dapp's own package.json, perhaps with a different version/range or
|
||||
// other specifier
|
||||
// in the dapp's own package.json
|
||||
|
||||
// NOTE: embark modifies process.env.NODE_PATH so that when running dapp
|
||||
// scripts in embark's child processes, embark's own node_modules directory
|
||||
// will be searched by node's require(); that allows an ejected version of this
|
||||
// config, inside a dapp, to function correctly without embark being an
|
||||
// explicit dependency of the dapp; however, webpack and babel do not directly
|
||||
// support NODE_PATH, so in various parts of the config, modules such as babel
|
||||
// plugins and presets must be resolved with require.resolve(); that is only
|
||||
// necessary if a plugin/preset is in embark's node_modules vs. the dapp's
|
||||
// node_modules
|
||||
// embark modifies process.env.NODE_PATH so that when running dapp scripts in
|
||||
// embark's child processes, embark's own node_modules directory will be
|
||||
// searched by node's require(); however, webpack and babel do not directly
|
||||
// support NODE_PATH, so modules such as babel plugins and presets must be
|
||||
// resolved with require.resolve(); that is only necessary if a plugin/preset
|
||||
// is in embark's node_modules vs. the dapp's node_modules
|
||||
|
||||
// there's a bug in pkg clone-deep re: regex; for now use lodash.clonedeep
|
||||
// see: https://github.com/jonschlinkert/clone-deep/pull/14
|
||||
const cloneDeep = require('lodash.clonedeep');
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const glob = require('glob');
|
||||
|
@ -35,13 +27,7 @@ const buildDir = path.join(dappPath, embarkJson.buildDir);
|
|||
|
||||
// it's important to `embark reset` if a pkg version is specified in
|
||||
// embark.json and changed/removed later, otherwise pkg resolution may behave
|
||||
// unexpectedly, e.g. a different version may get used owing to lexographical
|
||||
// order or because .embark/versions is still in place even though defaults are
|
||||
// desired; once embark and its dependencies are always resolvable (in the
|
||||
// usual node sense) relative to a dapp, embark's pkg version-management
|
||||
// functionality can probably be deprecated in favor of a dapp simply
|
||||
// specifying dependencies in its own package.json, e.g. a different ipfs
|
||||
// version than embark's default
|
||||
// unexpectedly
|
||||
let versions;
|
||||
try {
|
||||
versions = glob.sync(path.join(dappPath, '.embark/versions/*/*'));
|
||||
|
|
Loading…
Reference in New Issue