I know webpack 4 is very old as it's published at 2018. But in my project it's webpack4 still. And i want to export esmodule format file. So i can use to load javascript files. And my babel config is like:
const morden = {
presets: [
['@babel/preset-env', {
modules: false,
targets: {
esmodules: true
}
}]
],
plugins: [
['@babel/plugin-syntax-dynamic-import']
],
sourceType: 'unambiguous',
comments: false,
};
And webpack config is like:
...
output: {
publicPath,
path: path.resolve(
__dirname,
'../dist/',
'pro',
version
),
filename,
},
...
does my config right?