entry: './index.js',
output: {
path: path.join(__dirname, 'dist'),
filename: ' name.bundle.js',
},
externals: [nodeExternals({ modulesFromFile: true })],
node: {
__filename: true,
__dirname: true,
},
module: {
rules: [
{ test: /\.js?$/, exclude: /node_modules/, loader: 'babel-loader' },
],
},
plugins: [
new Dotenv({ path: path.join(__dirname, '.env') }),
],
};
Please format the code you posted, by wrapping it in triple backticks. -> `
Why a dotenv plugin if you're using process.env directly?
Обсуждают сегодня