[init]
This commit is contained in:
26
src_bundle/index.mjs
Normal file
26
src_bundle/index.mjs
Normal file
@@ -0,0 +1,26 @@
|
||||
import wp from 'webpack';
|
||||
import path from 'node:path'
|
||||
const outputPath = path.resolve('./output/');
|
||||
console.log(outputPath);
|
||||
const compiler = wp({
|
||||
entry:'./test_src/arithmetic.cjs',
|
||||
mode: 'production',
|
||||
optimization:{
|
||||
mangleExports: false,
|
||||
avoidEntryIife: true,
|
||||
minimize: false
|
||||
},
|
||||
output: {
|
||||
path: outputPath,
|
||||
filename: 'lodash.bundle.js',
|
||||
scriptType: 'module',
|
||||
|
||||
}
|
||||
,
|
||||
},(err,stats)=>{
|
||||
if (err || stats.hasErrors()) {
|
||||
console.log(stats.hasErrors())
|
||||
console.log(err?.stack)
|
||||
console.log(stats.toJson());
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user