gndx / js-portfolio Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hola, estaba haciendo el curso de platzi de webpack y pues haciendo los pasos al pie de la letra, pero aun asi me manda un error que no entiendo el por que...
El error es el siguiente
Leyendo, y siguiendo los consejos del curso de npm, lei el debug del error. Creí que se estaba originando por problemas dentro de node_modules y package.lock.json, por ende los deletie y limpie cache, pero aun asi no funciono.
Alguna consejo o ayuda?
//SOLUCION
Luego de leer el codigo bien, hacer buenas investigaciones. Era mas sencillo de lo que parecia.
En el archivo, webpack.config.js. despues de la seccion resolve, dentro de module.
Es importante dejar bien escritas las "rules", para que asi compile el programa.
`const path = require ('path');
module.exports = {
entry: './src/index.js', // => Y aquí habia un typo, importante leer el codigo para saber que errores se puedan llegar aocasionar
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'main.js',
},
resolve: {
extensions: ['.js']
},
module: {
rules: [ // => ESTA ES LA PARTE QUE NO TENIA BIEN ESPECIFICADA
{
test: /.m?js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
}
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.