Commit 61acb25d by Ari Rizzitano

unscoped build working

parent a0212917
...@@ -22,7 +22,7 @@ module.exports = { ...@@ -22,7 +22,7 @@ module.exports = {
loader: 'css-loader', loader: 'css-loader',
options: { options: {
modules: true, modules: true,
localIdentName: '[name]__[local]___[hash:base64:5]', localIdentName: '[local]',
sourceMap: true, sourceMap: true,
}, },
}, },
......
...@@ -3,8 +3,12 @@ const merge = require('webpack-merge'); ...@@ -3,8 +3,12 @@ const merge = require('webpack-merge');
const MinifyPlugin = require('babel-minify-webpack-plugin'); const MinifyPlugin = require('babel-minify-webpack-plugin');
const scopedConfig = require('./webpack.scoped.config'); const scopedConfig = require('./webpack.scoped.config');
const unscopedConfig = require('./webpack.unscoped.config');
const commonConfig = { 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', devtool: 'cheap-source-map',
entry: { entry: {
paragon: path.resolve('./src/index.js'), paragon: path.resolve('./src/index.js'),
...@@ -60,4 +64,5 @@ const commonConfig = { ...@@ -60,4 +64,5 @@ const commonConfig = {
module.exports = [ module.exports = [
merge(commonConfig, scopedConfig), merge(commonConfig, scopedConfig),
merge(commonConfig, unscopedConfig),
]; ];
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = { module.exports = {
...@@ -12,7 +13,7 @@ module.exports = { ...@@ -12,7 +13,7 @@ module.exports = {
module: { module: {
rules: [ rules: [
{ {
test: /\.scss$/, test: /\.scss|\.css$/,
use: ExtractTextPlugin.extract({ use: ExtractTextPlugin.extract({
use: [ use: [
{ {
...@@ -20,21 +21,29 @@ module.exports = { ...@@ -20,21 +21,29 @@ module.exports = {
options: { options: {
modules: true, modules: true,
localIdentName: '[local]', 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