Commit 61acb25d by Ari Rizzitano

unscoped build working

parent a0212917
......@@ -22,7 +22,7 @@ module.exports = {
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]___[hash:base64:5]',
localIdentName: '[local]',
sourceMap: true,
},
},
......
......@@ -3,8 +3,12 @@ const merge = require('webpack-merge');
const MinifyPlugin = require('babel-minify-webpack-plugin');
const scopedConfig = require('./webpack.scoped.config');
const unscopedConfig = require('./webpack.unscoped.config');
const commonConfig = {
// 'source-map' raises errors (something about the combination)
// of MinifyPlugin and ExtractTextPlugin) -- see:
// https://github.com/webpack-contrib/babel-minify-webpack-plugin/issues/68
devtool: 'cheap-source-map',
entry: {
paragon: path.resolve('./src/index.js'),
......@@ -60,4 +64,5 @@ const commonConfig = {
module.exports = [
merge(commonConfig, scopedConfig),
merge(commonConfig, unscopedConfig),
];
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
......@@ -12,7 +13,7 @@ module.exports = {
module: {
rules: [
{
test: /\.scss$/,
test: /\.scss|\.css$/,
use: ExtractTextPlugin.extract({
use: [
{
......@@ -20,21 +21,29 @@ module.exports = {
options: {
modules: true,
localIdentName: '[local]',
sourceMap: true,
},
},
{
loader: 'sass-loader',
options: {
data: '@import "paragon-reset";',
includePaths: [
path.join(__dirname, '../src/utils'),
path.join(__dirname, '../node_modules'),
],
},
},
// {
// loader: 'sass-loader',
// options: {
// data: '@import "paragon-reset";',
// includePaths: [
// path.join(__dirname, './src/utils'),
// path.join(__dirname, './node_modules'),
// ],
// },
// },
],
}),
},
{
test: /\.(woff2?|ttf|svg|eot)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
options: {
outputPath: 'dist/',
},
},
],
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment