-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(): Add webpack support to build src with babel
- Loading branch information
1 parent
5a291c1
commit fa8d1d2
Showing
6 changed files
with
68 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -440,3 +440,4 @@ fabric.properties | |
# modules.xml | ||
# .idea/misc.xml | ||
# *.ipr | ||
dist |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.* | ||
*.log | ||
*.swp | ||
*.yml | ||
coverage | ||
docs/_book | ||
config | ||
dist/*.map | ||
lib |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack') | ||
|
||
module.exports = { | ||
entry: "./src/index.js", | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: "index.js" | ||
}, | ||
module: { | ||
preLoaders: [ | ||
{ | ||
test: /\.jsx?$/, | ||
loader: 'standard', | ||
exclude: /(node_modules)/ | ||
} | ||
], | ||
loaders: [ | ||
{ | ||
test: /\.js$/, | ||
include: [ | ||
path.resolve(__dirname, "src"), | ||
], | ||
exclude: [ | ||
path.resolve(__dirname, "node_modules"), | ||
], | ||
loader: 'babel', | ||
query: { | ||
presets: [ 'es2015' ] | ||
} | ||
} | ||
] | ||
} | ||
}; |