mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Load less tyle as string
This commit is contained in:
parent
385454f3f1
commit
0a828ee67f
@ -62,6 +62,7 @@
|
||||
"clone": "^2.1.1",
|
||||
"codeclimate-test-reporter": "^0.5.0",
|
||||
"css-loader": "^0.28.7",
|
||||
"css-to-string-loader": "^0.1.3",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-filelog": "^0.4.1",
|
||||
|
@ -26,17 +26,22 @@ const jsRule = {
|
||||
}
|
||||
}
|
||||
|
||||
const styleRule = { // load less to string
|
||||
test: /\.less$/,
|
||||
use: [
|
||||
{ loader: 'css-to-string-loader' },
|
||||
{ loader: 'css-loader' },
|
||||
{ loader: 'less-loader' }
|
||||
]
|
||||
}
|
||||
|
||||
const lessRule = {
|
||||
test: /\.less$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
use: [
|
||||
{
|
||||
loader: 'css-loader'
|
||||
},
|
||||
{
|
||||
loader: 'less-loader'
|
||||
}
|
||||
{ loader: 'css-loader' },
|
||||
{ loader: 'less-loader' }
|
||||
]
|
||||
})
|
||||
}
|
||||
@ -58,7 +63,7 @@ export const jsConfig = () => {
|
||||
libraryExport: 'default'
|
||||
},
|
||||
module: {
|
||||
rules: [lodashRule, jsRule]
|
||||
rules: [lodashRule, jsRule, styleRule]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1583,6 +1583,12 @@ css-selector-tokenizer@^0.7.0:
|
||||
fastparse "^1.1.1"
|
||||
regexpu-core "^1.0.0"
|
||||
|
||||
css-to-string-loader@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/css-to-string-loader/-/css-to-string-loader-0.1.3.tgz#c937175f2ec783969aefe14a4fba055f7b4f9562"
|
||||
dependencies:
|
||||
loader-utils "^0.2.15"
|
||||
|
||||
cssesc@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4"
|
||||
@ -3986,7 +3992,7 @@ loader-runner@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
|
||||
|
||||
loader-utils@^0.2.5:
|
||||
loader-utils@^0.2.15, loader-utils@^0.2.5:
|
||||
version "0.2.17"
|
||||
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
|
||||
dependencies:
|
||||
|
Loading…
x
Reference in New Issue
Block a user