5
리소스 번들을 위해 Webpack을 사용하고 있습니다. 현재 CSS와 JS 파일을 bundle.js라는 별도의 파일로 묶습니다. JS와 CSS를 html 파일에 인라인으로 포함시키는 방법은 무엇입니까?인라인 자바 스크립트 및 웹팩이있는 CSS
import HtmlWebpackPlugin from 'html-webpack-plugin';
import {HotModuleReplacementPlugin} from 'webpack';
export default {
entry: {app: './test/dev'},
module: {
loaders: [
{test: /\.js/, loader: 'babel-loader', exclude: /node_modules/},
{test: /\.scss$/, loader: 'style!css!sass'}
]
},
plugins: [new HotModuleReplacementPlugin(), new HtmlWebpackPlugin()],
devtool: 'eval-source-map'
};
당신은 해결책을 찾았나요? –
문제를 해결하기 위해 grunt-processhtml https://github.com/dciccale/grunt-processhtml을 사용하고 있습니다. – VJAI