Last active
September 10, 2017 16:50
-
-
Save mattn9x/f68365fe6b4c87cce2265276a0227767 to your computer and use it in GitHub Desktop.
Config loader for webpack
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
loaders: [ | |
/*loader css*/ | |
{ | |
test: /\.css$/, | |
exclude: /node_module/, | |
loader: 'style-loader!css-loader' | |
}, | |
/*loader babel transform es6 => es5*/ | |
{ | |
test: /\.js$/, | |
exclude: /node_module/, | |
loader: 'babel-loader', | |
query: { | |
//cacheDirectory tập tin đã biên dịch, sẽ không transform lại nếu nó ko thay đổi | |
optional: 'runtime', | |
cacheDirectory: true, | |
presets: ['es2015'] | |
} | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment