I have this app that im building.
https://jsfiddle.net/wvpysbnd/
vanilla js and bootstrap
webpack.config.js
const path = require('path')
module.exports ={
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
}
};
package.json
{
"name": "todolist",
"version": "1.0.0",
"description": "",
"private": true,
"main": "main.js",
"dependencies": {
"bootstrap": "^4.4.1"
},
"devDependencies": {
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
I'm getting this error:
ERROR in ./src/index.js 28:26
Module parse failed: Unexpected token (28:26)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
|
> static changeActivity = () =>{
| activityPage.addEventListener('click', (e) =>{
| e.preventDefault();
Even if I delete those lines, webpack seems to be stuck there.
Aucun commentaire:
Enregistrer un commentaire