d65faed9e6
increíblemente estuve 10 horas buscando por qué los sourcemaps se generaban sin código. al final era porque el output de webpack no puede contener partes de la ruta, solo el nombre del archivo.
34 lines
642 B
JavaScript
34 lines
642 B
JavaScript
const Dotenv = require('dotenv-webpack');
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
new Dotenv()
|
|
],
|
|
entry: {
|
|
'assets/js/pack': './_packs/entry.js',
|
|
},
|
|
output: {
|
|
path: __dirname,
|
|
filename: '[name].js'
|
|
},
|
|
mode: 'development',
|
|
devtool: 'inline-source-map',
|
|
devServer: {
|
|
port: 9095
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.m?js$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/preset-env'],
|
|
plugins: ['@babel/plugin-proposal-class-properties']
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
};
|