Browse Source

Missing BUILD in web and node

docs
Eli Perelman 8 years ago
parent
commit
376220adab
  1. 3
      packages/neutrino-preset-node/src/index.js
  2. 3
      packages/neutrino-preset-web/src/index.js

3
packages/neutrino-preset-node/src/index.js

@ -10,6 +10,7 @@ const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const CWD = process.cwd();
const SRC = path.join(CWD, 'src');
const BUILD = path.join(CWD, 'build');
const TEST = path.join(CWD, 'test');
const MODULES = path.join(__dirname, '../node_modules');
@ -29,7 +30,7 @@ module.exports = neutrino => {
.add(path.join(SRC, 'index.js'))
.end()
.output
.path(path.join(process.cwd(), 'build'))
.path(BUILD)
.filename('[name].js')
.libraryTarget('commonjs2')
.chunkFilename('[id].[chunkhash].js')

3
packages/neutrino-preset-web/src/index.js

@ -11,6 +11,7 @@ const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const CWD = process.cwd();
const SRC = path.join(CWD, 'src');
const BUILD = path.join(CWD, 'build');
const TEST = path.join(CWD, 'test');
const PKG = require(path.join(CWD, 'package.json'));
const FILE_LOADER = require.resolve('file-loader');
@ -28,7 +29,7 @@ module.exports = ({ config }) => {
.add(path.join(SRC, 'index.js'))
.end()
.output
.path(path.join(process.cwd(), 'build'))
.path(BUILD)
.publicPath('./')
.filename('[name].bundle.js')
.chunkFilename('[id].[chunkhash].js')

Loading…
Cancel
Save