.jsファイルをバンドルして正しくローダーで処理しています。私の現在の設定はここにある:Webpack 1.12:バンドルCSSファイル
"use strict";
var webpack = require("webpack");
module.exports = {
entry: {
main: 'main.js',
vendor: ["fixed-data-table","react","react-dom","jquery", "bootstrap"],
},
output: { path: "../resources/public", filename: 'bundle.js' },
plugins: [
new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"static/vendor.bundle.js"),
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
}),
],
module: {
loaders: [
{
test: /.js?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react', 'stage-0']
}
}
]
},
};
私は今cssファイルだけでなく、ベンダモジュールからそれらのいくつかの束を持っています。上記の構造に似て、私は自分のために同じ方法でバンドルをどのようにバンドルするのですか(ただ一つあります)と、モジュールのvendor.bundle.css?
テキストの抽出プラグインはここにお手伝いできます –
OK。私はこれを発見しました:https://webpack.github.io/docs/stylesheets.html#using-css、私は彼らのドキュメントを使用しようとします(それはちょっと混乱ですが) – cbll