mirror of
https://github.com/maputnik/editor.git
synced 2026-01-20 12:20:03 +00:00
Fix CSS loading for production
This commit is contained in:
@@ -7,14 +7,6 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const HOST = process.env.HOST || "127.0.0.1";
|
||||
const PORT = process.env.PORT || "8888";
|
||||
|
||||
// global css
|
||||
loaders.push({
|
||||
test: /[\/\\](node_modules|global)[\/\\].*\.css$/,
|
||||
loaders: [
|
||||
'style?sourceMap',
|
||||
'css'
|
||||
]
|
||||
});
|
||||
// local scss modules
|
||||
loaders.push({
|
||||
test: /[\/\\]src[\/\\].*\.scss/,
|
||||
@@ -24,14 +16,6 @@ loaders.push({
|
||||
'sass'
|
||||
]
|
||||
});
|
||||
// local css modules
|
||||
loaders.push({
|
||||
test: /[\/\\]src[\/\\].*\.css/,
|
||||
loaders: [
|
||||
'style?sourceMap',
|
||||
'css'
|
||||
]
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
target: 'web',
|
||||
|
||||
@@ -54,5 +54,12 @@ module.exports = [
|
||||
test: /\.js$/,
|
||||
include: /node_modules\/mapbox-gl\/js\/render\/shaders.js/,
|
||||
loader: 'transform/cacheable?brfs'
|
||||
},
|
||||
{
|
||||
test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/,
|
||||
loaders: [
|
||||
'style?sourceMap',
|
||||
'css'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -6,22 +6,11 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
|
||||
|
||||
// local css modules
|
||||
loaders.push({
|
||||
test: /[\/\\]src[\/\\].*\.css/,
|
||||
loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]')
|
||||
});
|
||||
|
||||
// local scss modules
|
||||
loaders.push({
|
||||
test: /[\/\\]src[\/\\].*\.scss/,
|
||||
loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]', 'sass')
|
||||
});
|
||||
// global css files
|
||||
loaders.push({
|
||||
test: /[\/\\](node_modules|global)[\/\\].*\.css$/,
|
||||
loader: ExtractTextPlugin.extract('style', 'css')
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
|
||||
Reference in New Issue
Block a user