Created
June 12, 2017 17:06
-
-
Save kasiriveni/9f7158cff5995ffefb6ad76f3aac99fc to your computer and use it in GitHub Desktop.
stackoverflow my solution : https://stackoverflow.com/questions/41167623/parse-error-in-webpacks-package-json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jquery from 'jquery'; | |
import'./style.css'; | |
console.log(jquery.fn.jquery) | |
console.log($.fn.jquery) | |
console.log(jQuery.fn.jquery) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "41167623", | |
"version": "1.0.0", | |
"description": "Parse Error in webpack's package.json", | |
"main": "main.js", | |
"scripts": { | |
"start": "webpack" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"css-loader": "^0.28.4", | |
"jquery": "^3.2.1", | |
"style-loader": "^0.18.2", | |
"webpack": "^2.6.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: green; | |
font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require("webpack"); | |
const path = require('path'); | |
module.exports = { | |
entry: "./main.js", | |
output: { | |
path: path.resolve(__dirname, 'build'), | |
filename: "bundle.js" | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.css$/, | |
use: [ | |
{ loader: "style-loader" }, | |
{ loader: "css-loader" } | |
] | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
$: "jquery", | |
jQuery: "jquery" | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do the steps