This file contains hidden or 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
function transformsSupport (value) { | |
var vendors = [null,'webkit','Moz','O','ms']; | |
var element = document.createElement('div'); | |
var featureSupport = false; | |
switch (value) { | |
case '2D': | |
featureSupport = propertySupport('Transform'); | |
break; | |
case '3D': |
This file contains hidden or 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
<div className="sidebar"></div> |
This file contains hidden or 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
<html> | |
<head> | |
<title>Getting Started</title> | |
<script src="https://unpkg.com/[email protected]"></script> | |
</head> | |
<body> | |
<script src="./src/index.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
var path = require('path'); | |
module.exports = { | |
entry: './src/index.js', | |
output: { | |
filename: 'bundle.js', | |
path: path.resolve(__dirname, 'dist') | |
} | |
}; |
This file contains hidden or 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 upper from './upper'; | |
const app = document.getElementById('app'); | |
app.innerHTML = 'Hello ' + upper('webpack'); |
This file contains hidden or 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
function upper(name) { | |
return name.toUpperCase(); | |
} | |
export default upper; |
This file contains hidden or 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
<html> | |
<head> | |
<title>Our app</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="bundle.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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": "myproject", | |
"version": "1.0.0", | |
"main": "index.js", | |
"scripts": { | |
"start": "webpack" | |
}, | |
"license": "MIT", | |
"devDependencies": { | |
"webpack": "^3.4.0" |
This file contains hidden or 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
Show hidden characters
{ | |
"presets": ["es2015", "react"] | |
} |
This file contains hidden or 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 path = require('path'); | |
module.exports = { | |
entry: './src/index.js', | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'bundle.js' | |
}, | |
module: { | |
rules: [ |
OlderNewer