// при создании кода выше я могу получить bundle.js
// При работе с узлом ./bundle.js я сталкиваюсь с проблемой
var LoopbackBootPlugin = require ('loopback-webpack-plugin');
const path = require ('path');
const buildPath = path.resolve(__dirname, 'build/target');
module.exports = {
entry: './index.js',
target: 'node',
output: {
path: buildPath,
filename: 'bundle.js'
},
resolve: {
extensions: ['.js']
},
module: {
rules: [{
test: /\.jsx?$/,
enforce: 'pre',
loader: 'source-map-loader'
}]
},
plugins: [
new LoopbackBootPlugin({
// test: /\.xxx$/, // may apply this only for some modules
options: {
pkg: {
"assets": "**"
},
}
}), // You can pass any loopback-boot options
// Default: appRootDir is the directory of the last entry,
]
};