return getPath('css/[name].css').replace('css/js', 'css');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
'app': path.join(__dirname, 'src', 'app.js')
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js'
},
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: "css-loader"
})
}
]
},
plugins: [
new ExtractTextPlugin("[name].css"),
]
};
import './qwerty.css';
body {
background: red;
}
entry: {
'app': path.join(__dirname, 'src', 'app.js')
}
entry: path.join(__dirname, 'src', 'app.js')
Но css-modules в купе с postcss делают жизнь проще
var video_url = 'https://www.youtube.com/oembed?format=json&url=http://www.youtube.com/watch?v=IvN5h9BE444';
$.ajax({
url: video_url,
type: 'post',
dataType: 'json',
success: function(a) {
console.log(a);
},
complete: function(a) {
console.log(a);
}
});