Last active
August 29, 2015 14:16
-
-
Save LeezQ/a16d668dd28a855a5f6f to your computer and use it in GitHub Desktop.
webpack demo file
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
module.exports = { | |
entry: { | |
config_index: "./src/config_event/config_index.js", | |
new_event: "./src/new_event/new_event.js", | |
event_list: "./src/event_list/event_list.js", | |
}, | |
output: { | |
path: 'dist/src' , | |
filename: "[name].js" | |
}, | |
externals: { | |
'react': 'window.React' | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.less$/, loader: 'style-loader!css-loader!less-loader' }, | |
{ test: /\.css$/, loader: "style!css" }, | |
{ test: /\.(js|jsx)$/, loader: 'jsx-loader?harmony' }, | |
{ test: /\.(jpg|png)$/, loader: "file-loader?name=[path][name].[ext]" } //如果是图片,使用 file-loader | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment