Last active
February 21, 2017 00:37
-
-
Save potato4d/6358e4d0162d1b8ba2399c188914476f to your computer and use it in GitHub Desktop.
英語資料を読むのが面倒な人のためのwebpack 2移行ガイド ref: http://qiita.com/potato4d/items/4975c3d9c5fe56fa78c1
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 services = [] | |
const serviceList = ["serviceA", "serviceB", "serviceD"]; | |
serviceList.map((s)=>{ | |
System.import("./services/" + s) | |
.then((mod)=>{ | |
services.push(mod); | |
}) | |
}); |
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
$ rm -Rf ./node_modules/ |
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 "./file_b" // これで動く | |
file_b("hoge") |
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
export default function(word){console.log(word)} |
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
module.exports = { | |
module: { | |
rules: [ | |
{ | |
test: /\.css/, | |
use: "css-loader" | |
} | |
] | |
} | |
} |
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
module.exports ={ | |
module: { | |
loaders: [ | |
{ | |
test: /\.css/, | |
use: "css" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment