improve ssr js/css file check

This commit is contained in:
Evan You 2017-04-24 12:02:25 +08:00
parent 2efc0446b3
commit a45e40d5bf

View File

@ -1,5 +1,5 @@
/* @flow */
export const isJS = (file: string): boolean => /\.js($|\?)/.test(file)
export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file)
export const isCSS = (file: string): boolean => /\.css($|\?)/.test(file)
export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file)