0
我正在使用webpack,我可以「無錯誤地導入」css文件,但是css並未導出到最終產品中。從節點js模塊導入css
的WebPack摘錄:
module: {
loaders: [
{test: /\.css$/,loader: 'css-loader'},
{test: /\.scss$/,loader: ExtractTextPlugin.extract('css-loader!sass-loader')},
{test: /\.js$/, loader: 'babel-loader', include},
{test: /\.json$/, loader: 'json', include},
{test: /\.jpe?g$|\.gif$|\.png$/i, loader: "file-loader" },
]
},
運行:
npm install hopscotch
代碼:
import 'hopscotch/dist/css/hopscotch.css';