var webpack = require('webpack'); module.exports = { entry: { a: "./a", b: "./b" }, output: { path: 'dist/js/page', filename: '[name].js', publicPath:“/js” //网站运行时的访问路径 }, module: { loaders: [ { test: /\.css$/, loader: 'style-loader!css-loader' }, { test: /\.js$/, loader: 'jsx-loader?harmony',exclude: /node_modules/ }, { test: /\.scss$/, loader: 'style!css!sass?sourceMap'}, { test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'}, {test: /\.json$/,loader: 'json'} ] } plugins: [new webpack.CommonsChunkPlugin("init.js") ], resolve: { root: 'E:/github/flux-example/src', extensions: ['', '.js', '.json', '.scss'], alias: { AppStore : 'js/stores/AppStores.js', ActionType : 'js/actions/ActionType.js', AppAction : 'js/actions/AppAction.js' } } };
|