update wxss loader

This commit is contained in:
dntzhang 2018-11-08 09:50:27 +08:00
parent 9096a3e6d2
commit c91cbe2631
3 changed files with 19 additions and 3 deletions

View File

@ -86,7 +86,7 @@ module.exports = {
// for React Native Web.
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
@ -117,7 +117,7 @@ module.exports = {
// options: {
// formatter: eslintFormatter,
// eslintPath: require.resolve('eslint'),
// },
// loader: require.resolve('eslint-loader'),
// },
@ -146,7 +146,7 @@ module.exports = {
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
@ -160,6 +160,13 @@ module.exports = {
'css-loader'
]
},
{
test: /\.wxss$/,
use: [
'to-string-loader',
'css-loader'
]
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.

View File

@ -191,6 +191,13 @@ module.exports = {
'css-loader'
]
},
{
test: /\.wxss$/,
use: [
'to-string-loader',
'css-loader'
]
},
// The notation here is somewhat confusing.
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.

View File

@ -98,6 +98,8 @@ class Element extends WeElement {
render = render
css = css
beforeRender() {
this._useId = 0
}