A parser for fis to compile webpack module.
fis.match('xx.js', {
parser: fis.plugin('webpack', {
module: {
rules: [{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
}]
},
// ...options
// 请参考 https://webpack.js.org/configuration/#options
})
})
或者
fis.match('xx.js', {
parser: fis.plugin('webpack', {
getOptions: function(webpack) {
return {
module: {
rules: [{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
}]
},
plugins: [
// Ignore require() calls in vs/language/typescript/lib/typescriptServices.js
new webpack.IgnorePlugin(
/^((fs)|(path)|(os)|(crypto)|(source-map-support))$/,
/vs\/language\/typescript\/lib/
)
]
}
}
})
})
MIT © zswang